1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
---|
3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
---|
4 | <head> |
---|
5 | <meta http-equiv="Content-Language" content="en" /> |
---|
6 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
---|
7 | <title>Slider Demo</title> |
---|
8 | <link rel="stylesheet" href="../themes/flora/flora.all.css" type="text/css" media="screen" title="Flora (Default)" /> |
---|
9 | <link rel="stylesheet" href="css/style.css" type="text/css" /> |
---|
10 | |
---|
11 | <script src="../jquery-1.2.3.min.js" type="text/javascript"></script> |
---|
12 | <script type="text/javascript" src="../jquery.dimensions.js"></script> |
---|
13 | |
---|
14 | <script type="text/javascript" src="../ui.mouse.js"></script> |
---|
15 | <script type="text/javascript" src="../ui.slider.js"></script> |
---|
16 | |
---|
17 | </head> |
---|
18 | <body class="flora"> |
---|
19 | |
---|
20 | <h2>1. Default, no options</h2> |
---|
21 | <div class="playground"> |
---|
22 | <div id='example1' class='ui-slider-1' style="margin: 40px;"> |
---|
23 | <div class='ui-slider-handle'></div> |
---|
24 | </div> |
---|
25 | <br /> |
---|
26 | <button onclick="$('#example1').slider('enable')">Enable</button> |
---|
27 | <button onclick="$('#example1').slider('disable')">Disable</button> |
---|
28 | </div> |
---|
29 | |
---|
30 | <h2>2. Stepping</h2> |
---|
31 | <div class="playground"> |
---|
32 | <div id='example2' class='ui-slider-2' style="margin: 40px;"> |
---|
33 | <div class='ui-slider-handle'></div> |
---|
34 | </div> |
---|
35 | </div> |
---|
36 | |
---|
37 | <h2>3. Multiple handles, with range</h2> |
---|
38 | <div class="playground"> |
---|
39 | <div id='example3' class='ui-slider-2' style="margin: 40px;"> |
---|
40 | <div class='ui-slider-handle'></div> |
---|
41 | <div class='ui-slider-handle' style="left: 188px;"></div> |
---|
42 | </div> |
---|
43 | </div> |
---|
44 | |
---|
45 | <h2>4. Vertical slider, with range</h2> |
---|
46 | <div class="playground" style='height: 280px;'> |
---|
47 | <div id='example4' style="position: relative; margin: 40px; width: 20px; height: 200px; background: #eee;"> |
---|
48 | <div style='position: absolute; z-index: 1; background: green; width: 100%; height: 12px; top: 0px;'></div> |
---|
49 | <div style='position: absolute; z-index: 1; background: green; width: 100%; height: 12px; top: 188px;'></div> |
---|
50 | </div> |
---|
51 | </div> |
---|
52 | |
---|
53 | <script type="text/javascript"> |
---|
54 | if(!window.console) { |
---|
55 | window.console = { |
---|
56 | log: function() { |
---|
57 | //alert(arguments[0]); |
---|
58 | } |
---|
59 | } |
---|
60 | } |
---|
61 | |
---|
62 | $(window).bind("load",function(){ |
---|
63 | |
---|
64 | $('#example1').slider( { minValue: -100, maxValue: 100 } ); |
---|
65 | $('#example2').slider({ steps: 10 }); |
---|
66 | $('#example3').slider({ minValue: -100, maxValue: 0, steps: 10, range: true, change: function(e,ui) { console.log(ui.range); } }); |
---|
67 | $('#example4').slider({ steps: 10, range: true, change: function(e,ui) { console.log(ui.range); } }); |
---|
68 | |
---|
69 | }); |
---|
70 | </script> |
---|
71 | </body> |
---|
72 | </html> |
---|