Tizen 2.1 base
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.0.1pre / docs / buttons / buttons-methods.html
1 <!DOCTYPE html>
2 <html>
3         <head>
4         <meta charset="utf-8">
5         <meta name="viewport" content="width=device-width, initial-scale=1">
6         <title>jQuery Mobile Docs - Button methods</title>
7         <link rel="stylesheet"  href="../../css/themes/default/" />
8         <link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
9         <script src="../../js/jquery.js"></script>
10         <script src="../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
11         <script src="../_assets/js/jqm-docs.js"></script>
12         <script src="../../js/"></script>
13 </head>
14 <body>
15
16         <div data-role="page" class="type-interior">
17
18                 <div data-role="header" data-theme="f">
19                 <h1>Button basics</h1>
20                 <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
21         </div><!-- /header -->
22
23         <div data-role="content">
24                 <div class="content-primary">
25
26                 <form action="#" method="get">
27
28                         <h2>Button basics</h2>          
29                 
30       <ul data-role="controlgroup" data-type="horizontal" class="localnav">
31                         <li><a href="buttons-types.html" data-role="button" data-transition="fade">Basics</a></li>
32                         <li><a href="buttons-options.html" data-role="button" data-transition="fade">Options</a></li>
33                         <li><a href="buttons-methods.html" data-role="button" data-transition="fade" class="ui-btn-active">Methods</a></li>
34                         <li><a href="buttons-events.html" data-role="button" data-transition="fade">Events</a></li>
35                 </ul>   
36                         
37                         <p>The following methods apply only to <strong>form buttons</strong>.  Link-based buttons do not have any associated methods.</p>
38
39                 <dl>
40                                                 
41                         <dt><code>enable</code> enable a disabled form button</dt>
42                         <dd>
43                                 <pre><code>
44 $('[type='submit']').button('enable');                  
45                                 </code></pre>
46                         </dd>
47                         
48                         <dt><code>disable</code> disable a form button</dt>
49                         <dd>
50                                 <pre><code>
51 $('[type='submit']').button('disable');                 
52                                 </code></pre>
53                         </dd>
54                         
55                         <dt><code>refresh</code> update the form button</dt>
56                         <dd>
57                         <p>If you manipulate a form button via JavaScript, you must call the refresh method on it to update the visual styling.</p>                             
58                         
59                         <pre><code>             
60 $('[type='submit']').button('refresh');
61                                 </code></pre>
62                         </dd>
63                         
64                 </dl>   
65     
66         </form>
67         </div><!--/content-primary -->          
68         
69         <div class="content-secondary">
70                 
71                 <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
72                         
73                                 <h3>More in this section</h3>
74                                 
75                                 <ul data-role="listview" data-theme="c" data-dividertheme="d">                          
76                                         <li data-role="list-divider">Buttons</li>
77                                         <li data-theme="a"><a href="buttons-types.html">Button basics</a></li>
78                                         <li><a href="buttons-icons.html">Button icons</a></li>
79                                         <li><a href="buttons-inline.html">Inline buttons</a></li>
80                                         <li><a href="buttons-grouped.html">Grouped buttons</a></li>
81                                         <li><a href="buttons-themes.html">Theming buttons</a></li>      
82                                 </ul>
83                 </div>
84         </div>          
85
86 </div><!-- /content -->
87
88 <div data-role="footer" class="footer-docs" data-theme="c">
89                 <p>&copy; 2011 The jQuery Project</p>
90 </div>
91         
92 </div><!-- /page -->
93
94 </body>
95 </html>
96