~jstys-z/helioviewer.org/client5

« back to all changes in this revision

Viewing changes to lib/jquery/jquery.ui-1.7.1/development-bundle/demos/slider/steps.html

  • Committer: V. Keith Hughitt
  • Date: 2009-03-26 19:20:57 UTC
  • Revision ID: hughitt1@kore-20090326192057-u0x8rf8sf5lmmnwh
nightly build 03-26-2009: Using alpha-channel JPEG 2000 dataset

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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>