diff options
Diffstat (limited to 'static/development-bundle/demos/slider/steps.html')
-rw-r--r-- | static/development-bundle/demos/slider/steps.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/static/development-bundle/demos/slider/steps.html b/static/development-bundle/demos/slider/steps.html new file mode 100644 index 0000000..f29b734 --- /dev/null +++ b/static/development-bundle/demos/slider/steps.html | |||
@@ -0,0 +1,48 @@ | |||
1 | <!doctype html> | ||
2 | <html lang="en"> | ||
3 | <head> | ||
4 | <title>jQuery UI Slider - Snap to increments</title> | ||
5 | <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" /> | ||
6 | <script type="text/javascript" src="../../jquery-1.3.2.js"></script> | ||
7 | <script type="text/javascript" src="../../ui/ui.core.js"></script> | ||
8 | <script type="text/javascript" src="../../ui/ui.slider.js"></script> | ||
9 | <link type="text/css" href="../demos.css" rel="stylesheet" /> | ||
10 | <style type="text/css"> | ||
11 | #demo-frame > div.demo { padding: 10px !important; }; | ||
12 | </style> | ||
13 | <script type="text/javascript"> | ||
14 | $(function() { | ||
15 | $("#slider").slider({ | ||
16 | value:100, | ||
17 | min: 0, | ||
18 | max: 500, | ||
19 | step: 50, | ||
20 | slide: function(event, ui) { | ||
21 | $("#amount").val('$' + ui.value); | ||
22 | } | ||
23 | }); | ||
24 | $("#amount").val('$' + $("#slider").slider("value")); | ||
25 | }); | ||
26 | </script> | ||
27 | </head> | ||
28 | <body> | ||
29 | |||
30 | <div class="demo"> | ||
31 | |||
32 | <p> | ||
33 | <label for="amount">Donation amount ($50 increments):</label> | ||
34 | <input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" /> | ||
35 | </p> | ||
36 | |||
37 | <div id="slider"></div> | ||
38 | |||
39 | </div><!-- End demo --> | ||
40 | |||
41 | <div class="demo-description"> | ||
42 | |||
43 | <p>Increment slider values with the <code>step</code> option set to an integer, commonly a dividend of the slider's maximum value. The default increment is 1.</p> | ||
44 | |||
45 | </div><!-- End demo-description --> | ||
46 | |||
47 | </body> | ||
48 | </html> | ||