Tizen 2.0 Release
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.2.0 / docs / forms / switch / 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 - Slider methods</title>
7         <link rel="stylesheet"  href="../../../css/themes/default/jquery.mobile.css" />
8         <link rel="stylesheet" href="../../_assets/css/jqm-docs.css"/>
9         <script src="../../../js/jquery.js"></script>
10         <script src="../../../docs/_assets/js/jqm-docs.js"></script>
11         <script src="../../../js/"></script>
12
13 </head>
14 <body>
15
16         <div data-role="page" class="type-interior">
17
18                 <div data-role="header" data-theme="f">
19                 <h1>Flip Toggle Switch</h1>
20                 <a href="../../../" data-icon="home" data-iconpos="notext" data-direction="reverse">Home</a>
21                 <a href="../../nav.html" data-icon="search" data-iconpos="notext" data-rel="dialog" data-transition="fade">Search</a>
22         </div><!-- /header -->
23
24         <div data-role="content">
25                 <div class="content-primary">
26
27                 <form action="#" method="get">
28
29                         <h2>Flip toggle switch</h2>
30                         
31                         <ul data-role="controlgroup" data-type="horizontal" class="localnav">
32                                 <li><a href="index.html" data-role="button" data-transition="fade">Basics</a></li>
33                                 <li><a href="options.html" data-role="button" data-transition="fade">Options</a></li>
34                                 <li><a href="methods.html" data-role="button" data-transition="fade" class="ui-btn-active">Methods</a></li>
35                                 <li><a href="events.html" data-role="button" data-transition="fade">Events</a></li>
36                         </ul>
37                         
38                         <p>The slider plugin has the following methods:</p>
39
40                 <dl>                                                                    
41                         <dt><code>enable</code> enable a disabled slider</dt>
42                         <dd>
43                                 <pre><code>
44 $('.selector').slider('enable');                        
45                                 </code></pre>
46                         </dd>
47                         
48                         <dt><code>disable</code> disable a slider</dt>
49                         <dd>
50                                 <pre><code>
51 $('.selector').slider('disable');                       
52                                 </code></pre>
53                         </dd>
54                                                 
55                         <dt><code>refresh</code> update the slider</dt>
56                         <dd>
57                         <p>If you manipulate a slider via JavaScript, you must call the refresh method on it to update the visual styling.</p>                          
58                         
59                         <pre><code>                     
60 $('.selector').slider('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                                 
77                                         <li data-role="list-divider">Form elements</li>
78                                         <li><a href="../docs-forms.html">Form basics</a></li>
79                                         <li><a href="../forms-all.html">Form element gallery</a></li>
80                                         <li><a href="../forms-all-mini.html">Mini form element gallery</a></li>
81                                         <li><a href="../textinputs/index.html">Text inputs</a></li>
82                                         <li><a href="../search/">Search input</a></li>
83                                         <li><a href="../slider/">Slider</a></li>
84                                         <li data-theme="a"><a href="index.html">Flip toggle switch</a></li>
85                                         <li><a href="../radiobuttons/">Radio buttons</a></li>
86                                         <li><a href="../checkboxes/">Checkboxes</a></li>
87                                         <li><a href="../selects/">Select menus</a></li>
88                                         <li><a href="../forms-themes.html">Theming forms</a></li>
89                                         <li><a href="../forms-all-native.html">Native form elements</a></li>
90                                         <li><a href="../forms-sample.html">Submitting forms</a></li>
91                                         
92         
93                                 </ul>
94                 </div>
95         </div>          
96
97 </div><!-- /content -->
98
99 <div data-role="footer" class="footer-docs" data-theme="c">
100                 <p class="jqm-version"></p>
101                 <p>&copy; 2012 jQuery Foundation and other contributors</p>
102 </div>
103         
104 </div><!-- /page -->
105
106 </body>
107 </html>
108