diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-08-07 12:59:50 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-08-07 12:59:50 -0400 |
commit | ca2211f74851a066829464e78f50c90b49eac2dd (patch) | |
tree | 6e45fc575cc50586260270202bdc170060dde716 /demos/spinner/decimal.html | |
parent | 6c84531d7ced59fc3b884aa11845c7016d4187aa (diff) | |
download | jquery-ui-ca2211f74851a066829464e78f50c90b49eac2dd.tar.gz jquery-ui-ca2211f74851a066829464e78f50c90b49eac2dd.zip |
Spinner demos: Cleanup.
Diffstat (limited to 'demos/spinner/decimal.html')
-rw-r--r-- | demos/spinner/decimal.html | 54 |
1 files changed, 29 insertions, 25 deletions
diff --git a/demos/spinner/decimal.html b/demos/spinner/decimal.html index 0444aa104..70e0e99fd 100644 --- a/demos/spinner/decimal.html +++ b/demos/spinner/decimal.html @@ -1,40 +1,41 @@ -<!DOCTYPE html> +<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> - <title>jQuery UI Spinner - decimal</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="../../external/jquery.global.de-DE.js"></script> - <script type="text/javascript" src="../../external/jquery.global.ja-JP.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"> + <title>jQuery UI Spinner - Decimal</title> + <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="../../external/jquery.global.js"></script> + <script src="../../external/jquery.global.de-DE.js"></script> + <script src="../../external/jquery.global.ja-JP.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({ + $( "#spinner" ).spinner({ step: 0.01, numberFormat: "n" }); - - $("#culture").change(function() { - var current = $("#spinner").spinner("value"); - $.global.preferCulture($(this).val()); - $("#spinner").spinner("value", current); - }) + + $( "#culture" ).change(function() { + var current = $( "#spinner" ).spinner( "value" ); + $.global.preferCulture( $(this).val() ); + $( "#spinner" ).spinner( "value", current ); + }); }); </script> </head> <body> <div class="demo"> + <p> <label for="spinner">Decimal spinner:</label> - <input id="spinner" name="spinner" value="5.06" /> + <input id="spinner" name="spinner" value="5.06"> </p> <p> <label for="culture">Select a culture to use for formatting:</label> @@ -44,16 +45,19 @@ <option value="ja-JP">Japanese</option> </select> </p> -</div> + +</div><!-- End demo --> + + <div class="demo-description"> <p> Example of a decimal spinner. Step is set to 0.01. - <br/>The code handling the culture change reads the current spinner value, + <br>The code handling the culture change reads the current spinner value, then changes the culture, then sets the value again, resulting in an updated formatting, based on the new culture. </p> -</div> +</div><!-- End demo-description --> </body> </html> |