Tizen 2.1 base
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.0.1pre / docs / forms / selects / 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 - Select events</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>Select Menus</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>Select menus</h2>
29                         
30                         <ul data-role="controlgroup" data-type="horizontal" class="localnav">
31                                 <li><a href="custom.html" data-role="button" data-transition="fade">Custom</a></li>
32                                 <li><a href="options.html" data-role="button" data-transition="fade">Options</a></li>
33                                 <li><a href="methods.html" data-role="button" data-transition="fade">Methods</a></li>
34                                 <li><a href="events.html" data-role="button" data-transition="fade" class="ui-btn-active">Events</a></li>
35                         </ul>
36                         
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 $(".mySelect").bind( "change", function(event, ui) {
41   ...
42 });
43 </code></pre> 
44                         
45                         <p>The select menu plugin has the following custom events:</p>
46
47         <dl>
48                                 
49                 <dt><code>create</code> triggered when a select menu is created</dt>
50                 <dd>
51
52                         <pre><code>
53 $( ".selector" ).selectmenu({
54    create: function(event, ui) { ... }
55 });             
56                         </code></pre>
57                 </dd>
58                 
59
60         </dl>
61             
62         </form>
63         </div><!--/content-primary -->          
64         
65         <div class="content-secondary">
66                 
67                 <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
68                         
69                                 <h3>More in this section</h3>
70                                 
71                                 <ul data-role="listview" data-theme="c" data-dividertheme="d">
72                                 
73                                         <li data-role="list-divider">Form elements</li>
74                                         <li><a href="../docs-forms.html">Form basics</a></li>
75                                         <li><a href="../forms-all.html">Form element gallery</a></li>
76                                         <li><a href="../textinputs/index.html">Text inputs</a></li>
77                                         <li><a href="../search/">Search input</a></li>
78                                         <li><a href="../slider/">Slider</a></li>
79                                         <li><a href="../switch/">Flip toggle switch</a></li>
80                                         <li><a href="../radiobuttons/">Radio buttons</a></li>
81                                         <li><a href="../checkboxes/">Checkboxes</a></li>
82                                         <li data-theme="a"><a href="index.html">Select menus</a></li>
83                                         <li><a href="../forms-themes.html">Theming forms</a></li>
84                                         <li><a href="../forms-all-native.html">Native form elements</a></li>
85                                         <li><a href="../forms-sample.html">Submitting forms</a></li>
86                                         
87         
88                                 </ul>
89                 </div>
90         </div>          
91
92 </div><!-- /content -->
93
94 <div data-role="footer" class="footer-docs" data-theme="c">
95                 <p>&copy; 2011 The jQuery Project</p>
96 </div>
97         
98 </div><!-- /page -->
99
100 </body>
101 </html>
102