diff options
Diffstat (limited to 'demos/spinner/default.html')
-rw-r--r-- | demos/spinner/default.html | 71 |
1 files changed, 34 insertions, 37 deletions
diff --git a/demos/spinner/default.html b/demos/spinner/default.html index 53fd81bf5..c78c36d68 100644 --- a/demos/spinner/default.html +++ b/demos/spinner/default.html @@ -1,43 +1,38 @@ -<!DOCTYPE html> +<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery UI Spinner - Default functionality</title> - <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" /> - <script type="text/javascript" src="../../jquery-1.6.2.js"></script> - <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script> - <script type="text/javascript" src="../../external/jquery.global.js"></script> - <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script> - <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script> - <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script> - <script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script> - <link type="text/css" href="../demos.css" rel="stylesheet" /> - <script type="text/javascript"> + <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css"> + <script src="../../jquery-1.6.2.js"></script> + <script src="../../external/jquery.mousewheel-3.0.4.js"></script> + <script src="../../ui/jquery.ui.core.js"></script> + <script src="../../ui/jquery.ui.widget.js"></script> + <script src="../../ui/jquery.ui.button.js"></script> + <script src="../../ui/jquery.ui.spinner.js"></script> + <link rel="stylesheet" href="../demos.css"> + <script> $(function() { - $("#spinner").spinner({ - change: function() { - console.log( "change" ); - } - }); + var spinner = $( "#spinner" ).spinner(); - $("#disable").toggle(function() { - $("#spinner").spinner("disable"); + $( "#disable" ).toggle(function() { + spinner.spinner( "disable" ); }, function() { - $("#spinner").spinner("enable"); + spinner.spinner( "enable" ); }); - $("#destroy").toggle(function() { - $("#spinner").spinner("destroy"); + $( "#destroy" ).toggle(function() { + spinner.spinner( "destroy" ); }, function() { - $("#spinner").spinner(); + spinner.spinner(); }); - $("#getvalue").click(function() { - alert($("#spinner").spinner("value")); + $( "#getvalue" ).click(function() { + alert( spinner.spinner( "value" ) ); }); - $("#setvalue").click(function() { - $("#spinner").spinner("value", 5); + $( "#setvalue" ).click(function() { + spinner.spinner( "value", 5 ); }); - - $("button").button(); + + $( "button" ).button(); }); </script> </head> @@ -45,25 +40,27 @@ <div class="demo"> -<p><label for="spinner">Select a value:</label> -<input id="spinner" name="value" /></p> +<p> + <label for="spinner">Select a value:</label> + <input id="spinner" name="value"> +</p> <p> -<button id="disable">Toggle disable/enable</button> -<button id="destroy">Toggle widget</button> + <button id="disable">Toggle disable/enable</button> + <button id="destroy">Toggle widget</button> </p> <p> -<button id="getvalue">Get value</button> -<button id="setvalue">Set value to 5</button> + <button id="getvalue">Get value</button> + <button id="setvalue">Set value to 5</button> </p> </div><!-- End demo --> + + <div class="demo-description"> -<p> -Default spinner. -</p> +<p>Default spinner.</p> </div><!-- End demo-description --> </body> |