Tizen 2.0 Release
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.2.0 / docs / forms / switch / events.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 events</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">Methods</a></li>
35                                 <li><a href="events.html" data-role="button" data-transition="fade" class="ui-btn-active">Events</a></li>
36                         </ul>
37                         
38                         <p>Bind events directly to the <code>select</code> element.  Use jQuery Mobile's <a href="../../api/events.html">virtual events</a>, or bind standard JavaScript events, like change, focus, blur, etc.:</p>
39                         <pre><code> 
40 $( ".selector" ).bind( "change", function(event, ui) {
41   ...
42 });
43 </code></pre> 
44                         
45                         <p>The slider plugin has the following custom event:</p>
46
47         <dl>
48                                 
49                 <dt><code>create</code> triggered when a slider is created</dt>
50                 <dd>
51
52                         <pre><code>
53 $( ".selector" ).slider({
54    create: function(event, ui) { ... }
55 });             
56                         </code></pre>
57                 </dd>
58                 
59                 <dt><code>slidestart</code> triggered when there's an initial interaction with the slider. Includes drags and taps.</dt>
60                 <dd>
61
62                         <pre><code>
63 $( ".selector" ).on( 'slidestart', function( event ) { ... });
64                         </code></pre>
65                 </dd>
66
67                 <dt><code>slidestop</code> triggered at the end of an interaction with the slider. Includes drags and taps.</dt>
68                 <dd>
69
70                         <pre><code>
71 $( ".selector" ).on( 'slidestop', function( event ) { ... });
72                         </code></pre>
73                 </dd>
74         
75         </dl>
76             
77         </form>
78         </div><!--/content-primary -->          
79         
80         <div class="content-secondary">
81                 
82                 <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
83                         
84                                 <h3>More in this section</h3>
85                                 
86                                 <ul data-role="listview" data-theme="c" data-dividertheme="d">
87                                 
88                                         <li data-role="list-divider">Form elements</li>
89                                         <li><a href="../docs-forms.html">Form basics</a></li>
90                                         <li><a href="../forms-all.html">Form element gallery</a></li>
91                                         <li><a href="../forms-all-mini.html">Mini form element gallery</a></li>
92                                         <li><a href="../textinputs/index.html">Text inputs</a></li>
93                                         <li><a href="../search/">Search input</a></li>
94                                         <li><a href="../slider/">Slider</a></li>
95                                         <li data-theme="a"><a href="index.html">Flip toggle switch</a></li>
96                                         <li><a href="../radiobuttons/">Radio buttons</a></li>
97                                         <li><a href="../checkboxes/">Checkboxes</a></li>
98                                         <li><a href="../selects/">Select menus</a></li>
99                                         <li><a href="../forms-themes.html">Theming forms</a></li>
100                                         <li><a href="../forms-all-native.html">Native form elements</a></li>
101                                         <li><a href="../forms-sample.html">Submitting forms</a></li>
102                                         
103         
104                                 </ul>
105                 </div>
106         </div>          
107
108 </div><!-- /content -->
109
110 <div data-role="footer" class="footer-docs" data-theme="c">
111                 <p class="jqm-version"></p>
112                 <p>&copy; 2012 jQuery Foundation and other contributors</p>
113 </div>
114         
115 </div><!-- /page -->
116
117 </body>
118 </html>
119