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/" />
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>
16 <div data-role="page" class="type-interior">
18 <div data-role="header" data-theme="f">
19 <h1>Button basics</h1>
20 <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
21 </div><!-- /header -->
23 <div data-role="content">
24 <div class="content-primary">
26 <form action="#" method="get">
28 <h2>Button basics</h2>
30 <ul data-role="controlgroup" data-type="horizontal" class="localnav">
31 <li><a href="buttons-types.html" data-role="button" data-transition="fade">Basics</a></li>
32 <li><a href="buttons-options.html" data-role="button" data-transition="fade">Options</a></li>
33 <li><a href="buttons-methods.html" data-role="button" data-transition="fade">Methods</a></li>
34 <li><a href="buttons-events.html" data-role="button" data-transition="fade" class="ui-btn-active">Events</a></li>
37 <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>
39 $( ".myButton" ).bind( "click", function(event, ui) {
44 <p>The <strong>form button</strong> plugin has the following custom events:</p>
48 <dt><code>create</code> triggered when a form button is created</dt>
52 $('[type='submit']').button({
53 create: function(event, ui) { ... }
61 </div><!--/content-primary -->
63 <div class="content-secondary">
65 <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
67 <h3>More in this section</h3>
69 <ul data-role="listview" data-theme="c" data-dividertheme="d">
70 <li data-role="list-divider">Buttons</li>
71 <li data-theme="a"><a href="buttons-types.html">Button basics</a></li>
72 <li><a href="buttons-icons.html">Button icons</a></li>
73 <li><a href="buttons-inline.html">Inline buttons</a></li>
74 <li><a href="buttons-grouped.html">Grouped buttons</a></li>
75 <li><a href="buttons-themes.html">Theming buttons</a></li>
80 </div><!-- /content -->
82 <div data-role="footer" class="footer-docs" data-theme="c">
83 <p>© 2011 The jQuery Project</p>