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