Export 0.1.45
[framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.1.0 / docs / buttons / buttons-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 - Button events</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">Methods</a></li>
36                         <li><a href="buttons-events.html" data-role="button" data-transition="fade" class="ui-btn-active">Events</a></li>
37                 </ul>   
38                         
39                         <p>Bind events directly to the <code>a</code>, <code>input</code>, or <code>button</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>
40                         <pre><code> 
41 $( ".myButton" ).bind( "click", function(event, ui) {
42   ...
43 });
44 </code></pre> 
45                         
46                         <p>The <strong>form button</strong> plugin has the following custom events:</p>
47
48         <dl>
49                                 
50                 <dt><code>create</code> triggered when a form button is created</dt>
51                 <dd>
52
53                         <pre><code>
54 $('[type='submit']').button({
55    create: function(event, ui) { ... }
56 });             
57                         </code></pre>
58                         </dd>
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                                         <li data-role="list-divider">Buttons</li>
73                                         <li data-theme="a"><a href="buttons-types.html">Button basics</a></li>
74                                         <li><a href="buttons-icons.html">Button icons</a></li>
75                                         <li><a href="buttons-inline.html">Inline buttons</a></li>
76                                         <li><a href="buttons-grouped.html">Grouped buttons</a></li>
77                                         <li><a href="buttons-themes.html">Theming buttons</a></li>      
78                                 </ul>
79                 </div>
80         </div>          
81
82 </div><!-- /content -->
83
84 <div data-role="footer" class="footer-docs" data-theme="c">
85                 <p>&copy; 2011-12 The jQuery Foundation</p>
86 </div>
87         
88 </div><!-- /page -->
89
90 </body>
91 </html>
92