-<!DOCTYPE html>\r
-<html lang="en">\r
-<head>\r
- <meta charset="utf-8">\r
- <title>jQuery UI Spinner - Default functionality</title>\r
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />\r
- <script type="text/javascript" src="../../jquery-1.6.2.js"></script>\r
- <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>\r
- <script type="text/javascript" src="../../external/jquery.global.js"></script>\r
- <script type="text/javascript" src="../../external/jquery.global.de-DE.js"></script>\r
- <script type="text/javascript" src="../../external/jquery.global.ja-JP.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>\r
- <link type="text/css" href="../demos.css" rel="stylesheet" />\r
- <script type="text/javascript">\r
- $(function() {\r
- $("#currency").change(function() {\r
- var current = $("#spinner").spinner("value");\r
- $.global.preferCulture($(this).val());\r
- $("#spinner").spinner("value", current);\r
- })\r
- \r
- $("#spinner").spinner({\r
- min: 5,\r
- max: 2500,\r
- step: 25,\r
- start: 1000,\r
- numberFormat: "C"\r
- }); \r
- \r
- });\r
- </script>\r
-</head>\r
-<body>\r
-\r
-<div class="demo">\r
-\r
-<p>\r
- <label for="currency">Currency to donate</label>\r
- <select id="currency" name="currency">\r
- <option value="en-US">US $</option>\r
- <option value="de-DE">EUR €</option>\r
- <option value="ja-JP">YEN ¥</option>\r
- </select> \r
-</p>\r
-<p>\r
- <label for="spinner">Amount to donate:</label>\r
- <input id="spinner" name="spinner" value="5" />\r
-</p>\r
-</div>\r
-\r
-<div class="demo-description">\r
-<p>\r
- Example of a donation form, with currency selection and amout spinner.\r
-</p>\r
-</div>\r
-\r
-</body>\r
-</html>\r
+<!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="../../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">
+ $(function() {
+ $("#currency").change(function() {
+ var current = $("#spinner").spinner("value");
+ $.global.preferCulture($(this).val());
+ $("#spinner").spinner("value", current);
+ })
+
+ $("#spinner").spinner({
+ min: 5,
+ max: 2500,
+ step: 25,
+ start: 1000,
+ numberFormat: "C"
+ });
+
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+
+<p>
+ <label for="currency">Currency to donate</label>
+ <select id="currency" name="currency">
+ <option value="en-US">US $</option>
+ <option value="de-DE">EUR €</option>
+ <option value="ja-JP">YEN ¥</option>
+ </select>
+</p>
+<p>
+ <label for="spinner">Amount to donate:</label>
+ <input id="spinner" name="spinner" value="5" />
+</p>
+</div>
+
+<div class="demo-description">
+<p>
+ Example of a donation form, with currency selection and amout spinner.
+</p>
+</div>
+
+</body>
+</html>
-<!DOCTYPE html>\r
-<html lang="en">\r
-<head>\r
- <meta charset="utf-8">\r
- <title>jQuery UI Spinner - decimal</title>\r
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />\r
- <script type="text/javascript" src="../../jquery-1.6.2.js"></script>\r
- <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>\r
- <script type="text/javascript" src="../../external/jquery.global.js"></script>\r
- <script type="text/javascript" src="../../external/jquery.global.de-DE.js"></script>\r
- <script type="text/javascript" src="../../external/jquery.global.ja-JP.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>\r
- <link type="text/css" href="../demos.css" rel="stylesheet" />\r
- <script type="text/javascript">\r
- $(function() {\r
- $("#spinner").spinner({\r
- step: 0.01,\r
- numberFormat: "n"\r
- }); \r
- \r
- $("#culture").change(function() {\r
- var current = $("#spinner").spinner("value");\r
- $.global.preferCulture($(this).val());\r
- $("#spinner").spinner("value", current);\r
- })\r
- });\r
- </script>\r
-</head>\r
-<body>\r
-\r
-<div class="demo">\r
-<p>\r
- <label for="spinner">Decimal spinner:</label>\r
- <input id="spinner" name="spinner" value="5.06" />\r
-</p>\r
-<p>\r
- <label for="culture">Select a culture to use for formatting:</label>\r
- <select id="culture">\r
- <option value="en-EN" selected="selected">English</option>\r
- <option value="de-DE">German</option>\r
- <option value="ja-JP">Japanese</option>\r
- </select>\r
-</p>\r
-</div>\r
-\r
-<div class="demo-description">\r
-<p>\r
- Example of a decimal spinner. Step is set to 0.01.\r
- <br/>The code handling the culture change reads the current spinner value,\r
- then changes the culture, then sets the value again, resulting in an updated\r
- formatting, based on the new culture.\r
-</p>\r
-</div>\r
-\r
-</body>\r
-</html>\r
+<!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">
+ $(function() {
+ $("#spinner").spinner({
+ step: 0.01,
+ numberFormat: "n"
+ });
+
+ $("#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" />
+</p>
+<p>
+ <label for="culture">Select a culture to use for formatting:</label>
+ <select id="culture">
+ <option value="en-EN" selected="selected">English</option>
+ <option value="de-DE">German</option>
+ <option value="ja-JP">Japanese</option>
+ </select>
+</p>
+</div>
+
+<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,
+ then changes the culture, then sets the value again, resulting in an updated
+ formatting, based on the new culture.
+</p>
+</div>
+
+</body>
+</html>
-<!DOCTYPE html>\r
-<html lang="en">\r
-<head>\r
- <meta charset="utf-8">\r
- <title>jQuery UI Spinner - Default functionality</title>\r
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />\r
- <script type="text/javascript" src="../../jquery-1.6.2.js"></script>\r
- <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>\r
- <link type="text/css" href="../demos.css" rel="stylesheet" />\r
- <script type="text/javascript">\r
- $(function() {\r
- $("#spinner").spinner();\r
- \r
- $("#disable").toggle(function() {\r
- $("#spinner").spinner("disable");\r
- }, function() {\r
- $("#spinner").spinner("enable");\r
- });\r
- $("#destroy").toggle(function() {\r
- $("#spinner").spinner("destroy");\r
- }, function() {\r
- $("#spinner").spinner();\r
- });\r
- $("#getvalue").click(function() {\r
- alert($("#spinner").spinner("value"));\r
- });\r
- $("#setvalue").click(function() {\r
- $("#spinner").spinner("value", 5);\r
- });\r
- \r
- $("button").button();\r
- });\r
- </script>\r
-</head>\r
-<body>\r
-\r
-<div class="demo">\r
-\r
-<p><label for="spinner">Select a value:</label>\r
-<input id="spinner" name="value" /></p>\r
-\r
-<p>\r
-<button id="disable">Toggle disable/enable</button>\r
-<button id="destroy">Toggle widget</button>\r
-</p>\r
-\r
-<p>\r
-<button id="getvalue">Get value</button>\r
-<button id="setvalue">Set value to 5</button>\r
-</p>\r
-\r
-</div><!-- End demo -->\r
-\r
-<div class="demo-description">\r
-<p>\r
-Default spinner.\r
-</p>\r
-</div><!-- End demo-description -->\r
-\r
-</body>\r
-</html>\r
+<!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="../../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">
+ $(function() {
+ $("#spinner").spinner();
+
+ $("#disable").toggle(function() {
+ $("#spinner").spinner("disable");
+ }, function() {
+ $("#spinner").spinner("enable");
+ });
+ $("#destroy").toggle(function() {
+ $("#spinner").spinner("destroy");
+ }, function() {
+ $("#spinner").spinner();
+ });
+ $("#getvalue").click(function() {
+ alert($("#spinner").spinner("value"));
+ });
+ $("#setvalue").click(function() {
+ $("#spinner").spinner("value", 5);
+ });
+
+ $("button").button();
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+
+<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>
+</p>
+
+<p>
+<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>
+</div><!-- End demo-description -->
+
+</body>
+</html>
-<!DOCTYPE html>\r
-<html lang="en">\r
-<head>\r
- <title>jQuery UI Spinner Demos</title>\r
- <link type="text/css" href="../demos.css" rel="stylesheet" />\r
-</head>\r
-<body>\r
- <div class="demos-nav">\r
- <h4>Examples</h4>\r
- <ul>\r
- <li class="demo-config-on"><a href="default.html">Default functionality</a></li>\r
- <li><a href="decimal.html">Decimal</a></li>\r
- <li><a href="currency.html">Currency</a></li>\r
- <li><a href="latlong.html">Map</a></li>\r
- <li><a href="time.html">Time</a></li>\r
- <li><a href="overflow.html">Overflow</a></li>\r
- </ul>\r
- </div>\r
-</body>\r
-</html>\r
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>jQuery UI Spinner Demos</title>
+ <link type="text/css" href="../demos.css" rel="stylesheet" />
+</head>
+<body>
+ <div class="demos-nav">
+ <h4>Examples</h4>
+ <ul>
+ <li class="demo-config-on"><a href="default.html">Default functionality</a></li>
+ <li><a href="decimal.html">Decimal</a></li>
+ <li><a href="currency.html">Currency</a></li>
+ <li><a href="latlong.html">Map</a></li>
+ <li><a href="time.html">Time</a></li>
+ <li><a href="overflow.html">Overflow</a></li>
+ </ul>
+ </div>
+</body>
+</html>
-<!DOCTYPE html>\r
-<html lang="en">\r
-<head>\r
- <meta charset="utf-8">\r
- <title>jQuery UI Spinner - Map</title>\r
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />\r
- <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>\r
- <script type="text/javascript" src="../../jquery-1.6.2.js"></script>\r
- <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>\r
- <link type="text/css" href="../demos.css" rel="stylesheet" />\r
- <script type="text/javascript">\r
- $(function() {\r
- function latlong() {\r
- return new google.maps.LatLng($("#lat").val(),$("#lng").val());\r
- }\r
- function position() {\r
- map.setCenter(latlong());\r
- }\r
- $("#lat, #lng").spinner({\r
- precision: 6,\r
- change: position\r
- });\r
- \r
- var map = new google.maps.Map($("#map")[0], {\r
- zoom: 8,\r
- center: latlong(),\r
- mapTypeId: google.maps.MapTypeId.ROADMAP\r
- });\r
- });\r
- </script>\r
- <style>\r
- #map { width:500px; height:500px; }\r
- </style>\r
-</head>\r
-<body>\r
-\r
-<div class="demo">\r
-\r
-<label for="lat">Latitude</label>\r
-<input id="lat" name="lat" value="44.797916" />\r
-<br/>\r
-<label for="lng">Longitude</label>\r
-<input id="lng" name="lng" value="-93.278046" />\r
-\r
-<div id="map"></div>\r
-\r
-</div><!-- End demo -->\r
-\r
-<div class="demo-description">\r
-<p>\r
-Google Maps integration, using spinners to change latidude and longitude.\r
-</p>\r
-</div><!-- End demo-description -->\r
-\r
-</body>\r
-</html>\r
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>jQuery UI Spinner - Map</title>
+ <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
+ <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
+ <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="../../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">
+ $(function() {
+ function latlong() {
+ return new google.maps.LatLng($("#lat").val(),$("#lng").val());
+ }
+ function position() {
+ map.setCenter(latlong());
+ }
+ $("#lat, #lng").spinner({
+ precision: 6,
+ change: position
+ });
+
+ var map = new google.maps.Map($("#map")[0], {
+ zoom: 8,
+ center: latlong(),
+ mapTypeId: google.maps.MapTypeId.ROADMAP
+ });
+ });
+ </script>
+ <style>
+ #map { width:500px; height:500px; }
+ </style>
+</head>
+<body>
+
+<div class="demo">
+
+<label for="lat">Latitude</label>
+<input id="lat" name="lat" value="44.797916" />
+<br/>
+<label for="lng">Longitude</label>
+<input id="lng" name="lng" value="-93.278046" />
+
+<div id="map"></div>
+
+</div><!-- End demo -->
+
+<div class="demo-description">
+<p>
+Google Maps integration, using spinners to change latidude and longitude.
+</p>
+</div><!-- End demo-description -->
+
+</body>
+</html>
-<!DOCTYPE html>\r
-<html lang="en">\r
-<head>\r
- <meta charset="utf-8">\r
- <title>jQuery UI Spinner - Default functionality</title>\r
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />\r
- <script type="text/javascript" src="../../jquery-1.6.2.js"></script>\r
- <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>\r
- <link type="text/css" href="../demos.css" rel="stylesheet" />\r
- <script type="text/javascript">\r
- $(function() {\r
- $("#spinner").spinner({\r
- spin: function(event, ui) {\r
- if (ui.value > 10) {\r
- $(this).spinner("value", -10);\r
- return false;\r
- } else if (ui.value < -10) {\r
- $(this).spinner("value", 10);\r
- return false;\r
- }\r
- }\r
- });\r
- });\r
- </script>\r
-</head>\r
-<body>\r
-\r
-<div class="demo">\r
- <p>\r
- <label for="spinner">Select a value:</label>\r
- <input id="spinner" name="value" />\r
- </p>\r
-</div>\r
-\r
-<div class="demo-description">\r
- <p>\r
- Overflowing spinner restricted to a range of -10 to 10.\r
- For anything above 10, it'll overflow to -10, and the other way round.\r
- </p>\r
-</div>\r
-\r
-</body>\r
-</html>\r
+<!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="../../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">
+ $(function() {
+ $("#spinner").spinner({
+ spin: function(event, ui) {
+ if (ui.value > 10) {
+ $(this).spinner("value", -10);
+ return false;
+ } else if (ui.value < -10) {
+ $(this).spinner("value", 10);
+ return false;
+ }
+ }
+ });
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+ <p>
+ <label for="spinner">Select a value:</label>
+ <input id="spinner" name="value" />
+ </p>
+</div>
+
+<div class="demo-description">
+ <p>
+ Overflowing spinner restricted to a range of -10 to 10.
+ For anything above 10, it'll overflow to -10, and the other way round.
+ </p>
+</div>
+
+</body>
+</html>
-<!DOCTYPE html>\r
-<html lang="en">\r
-<head>\r
- <meta charset="utf-8">\r
- <title>jQuery UI Spinner - decimal</title>\r
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />\r
- <script type="text/javascript" src="../../jquery-1.6.2.js"></script>\r
- <script type="text/javascript" src="../../external/jquery.mousewheel-3.0.4.js"></script>\r
- <script type="text/javascript" src="../../external/jquery.global.js"></script>\r
- <script type="text/javascript" src="../../external/jquery.global.de-DE.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.button.js"></script>\r
- <script type="text/javascript" src="../../ui/jquery.ui.spinner.js"></script>\r
- <link type="text/css" href="../demos.css" rel="stylesheet" />\r
- <script type="text/javascript">\r
- $.widget("ui.timespinner", $.ui.spinner, {\r
- options: {\r
- // seconds\r
- step: 60 * 1000,\r
- // hours\r
- page: 60\r
- },\r
- \r
- _parse: function(value) {\r
- if (typeof value == 'string') {\r
- return +$.global.parseDate(value)\r
- }\r
- return value;\r
- },\r
- _format: function() {\r
- this.element.val( $.global.format(new Date(this.options.value), "t") );\r
- }\r
- })\r
- $(function() {\r
- $("#spinner").timespinner();\r
- \r
- $("#culture").change(function() {\r
- var current = $("#spinner").timespinner("value");\r
- $.global.preferCulture($(this).val());\r
- $("#spinner").timespinner("value", current);\r
- });\r
- });\r
- </script>\r
-</head>\r
-<body>\r
-\r
-<div class="demo">\r
-<p>\r
- <label for="spinner">Time spinner:</label>\r
- <input id="spinner" name="spinner" value="08:30 PM" />\r
-</p>\r
-<p>\r
- <label for="culture">Select a culture to use for formatting:</label>\r
- <select id="culture">\r
- <option value="en-EN" selected="selected">English</option>\r
- <option value="de-DE">German</option>\r
- </select>\r
-</p>\r
-</div>\r
-\r
-<div class="demo-description">\r
-<p>\r
- A custom widget extending spinner. Use the Globalization plugin to parse and output\r
- a timestamp, with custom step and page options. Cursor up/down spins minutes, page up/down\r
- spins hours.\r
-</p>\r
-</div>\r
-\r
-</body>\r
-</html>\r
+<!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="../../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">
+ $.widget("ui.timespinner", $.ui.spinner, {
+ options: {
+ // seconds
+ step: 60 * 1000,
+ // hours
+ page: 60
+ },
+
+ _parse: function(value) {
+ if (typeof value == 'string') {
+ return +$.global.parseDate(value)
+ }
+ return value;
+ },
+ _format: function() {
+ this.element.val( $.global.format(new Date(this.options.value), "t") );
+ }
+ })
+ $(function() {
+ $("#spinner").timespinner();
+
+ $("#culture").change(function() {
+ var current = $("#spinner").timespinner("value");
+ $.global.preferCulture($(this).val());
+ $("#spinner").timespinner("value", current);
+ });
+ });
+ </script>
+</head>
+<body>
+
+<div class="demo">
+<p>
+ <label for="spinner">Time spinner:</label>
+ <input id="spinner" name="spinner" value="08:30 PM" />
+</p>
+<p>
+ <label for="culture">Select a culture to use for formatting:</label>
+ <select id="culture">
+ <option value="en-EN" selected="selected">English</option>
+ <option value="de-DE">German</option>
+ </select>
+</p>
+</div>
+
+<div class="demo-description">
+<p>
+ A custom widget extending spinner. Use the Globalization plugin to parse and output
+ a timestamp, with custom step and page options. Cursor up/down spins minutes, page up/down
+ spins hours.
+</p>
+</div>
+
+</body>
+</html>