diff options
Diffstat (limited to 'demos/button/default.html')
-rw-r--r-- | demos/button/default.html | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/demos/button/default.html b/demos/button/default.html index 88c666e9a..5418fd8c9 100644 --- a/demos/button/default.html +++ b/demos/button/default.html @@ -11,25 +11,33 @@ <script src="../../ui/button.js"></script> <link rel="stylesheet" href="../demos.css"> <script> - $(function() { - $( "input[type=submit], a, button" ) - .button() - .on( "click", function( event ) { - event.preventDefault(); - }); - }); + $( function() { + $( ".widget input[type=submit], .widget a, .widget button" ).button(); + $( "button, input, a" ).click( function( event ) { + event.preventDefault(); + } ); + } ); </script> </head> <body> +<div class="widget"> + <h1>Widget Buttons</h1> + <button>A button element</button> -<button>A button element</button> + <input type="submit" value="A submit button"> -<input type="submit" value="A submit button"> + <a href="#">An anchor</a> +</div> +<h1>CSS Buttons</h1> +<button class="ui-button ui-widget ui-corner-all">A button element</button> + +<input class="ui-button ui-widget ui-corner-all" type="submit" value="A submit button"> -<a href="#">An anchor</a> +<a class="ui-button ui-widget ui-corner-all" href="#">An anchor</a> <div class="demo-description"> <p>Examples of the markup that can be used for buttons: A button element, an input of type submit and an anchor.</p> +<p>Buttons can be styled via the button widget or by adding the classes yourself. This avoids the JavaScript overhead if you don't need any of the methods provided by the button widget.</p> </div> </body> </html> |