1 | <!doctype html>
|
---|
2 | <html lang="en">
|
---|
3 | <head>
|
---|
4 | <title>jQuery UI Slider - Multiple sliders</title>
|
---|
5 | <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
|
---|
6 | <script type="text/javascript" src="../../jquery-1.4.1.js"></script>
|
---|
7 | <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
|
---|
8 | <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
|
---|
9 | <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
|
---|
10 | <script type="text/javascript" src="../../ui/jquery.ui.slider.js"></script>
|
---|
11 | <link type="text/css" href="../demos.css" rel="stylesheet" />
|
---|
12 | <style type="text/css">
|
---|
13 | #demo-frame > div.demo { padding: 10px !important; }
|
---|
14 | #eq span {
|
---|
15 | height:120px; float:left; margin:15px
|
---|
16 | }
|
---|
17 | </style>
|
---|
18 | <script type="text/javascript">
|
---|
19 | $(function() {
|
---|
20 | // change defaults for range, animate and orientation
|
---|
21 | $.extend($.ui.slider.prototype.options, {
|
---|
22 | range: "min",
|
---|
23 | animate: true,
|
---|
24 | orientation: "vertical"
|
---|
25 | });
|
---|
26 | // setup master volume
|
---|
27 | $("#master").slider({
|
---|
28 | value: 60,
|
---|
29 | orientation: "horizontal"
|
---|
30 | });
|
---|
31 | // setup graphic EQ
|
---|
32 | $("#eq > span").each(function() {
|
---|
33 | // read initial values from markup and remove that
|
---|
34 | var value = parseInt($(this).text());
|
---|
35 | $(this).empty();
|
---|
36 | $(this).slider({
|
---|
37 | value: value
|
---|
38 | })
|
---|
39 | });
|
---|
40 | });
|
---|
41 | </script>
|
---|
42 | </head>
|
---|
43 | <body class="ui-widget-content" style="border:0;">
|
---|
44 |
|
---|
45 | <div class="demo">
|
---|
46 |
|
---|
47 | <p class="ui-state-default ui-corner-all ui-helper-clearfix" style="padding:4px;">
|
---|
48 | <span class="ui-icon ui-icon-volume-on" style="float:left; margin:-2px 5px 0 0;"></span>
|
---|
49 | Master volume
|
---|
50 | </p>
|
---|
51 |
|
---|
52 | <div id="master" style="width:260px; margin:15px;"></div>
|
---|
53 |
|
---|
54 | <p class="ui-state-default ui-corner-all" style="padding:4px;margin-top:4em;">
|
---|
55 | <span class="ui-icon ui-icon-signal" style="float:left; margin:-2px 5px 0 0;"></span>
|
---|
56 | Graphic EQ
|
---|
57 | </p>
|
---|
58 |
|
---|
59 | <div id="eq">
|
---|
60 | <span>88</span>
|
---|
61 | <span>77</span>
|
---|
62 | <span>55</span>
|
---|
63 | <span>33</span>
|
---|
64 | <span>40</span>
|
---|
65 | <span>45</span>
|
---|
66 | <span>70</span>
|
---|
67 | </div>
|
---|
68 |
|
---|
69 | </div><!-- End demo -->
|
---|
70 |
|
---|
71 | <div class="demo-description" style="clear:left;">
|
---|
72 |
|
---|
73 | <p>Combine horizontal and vertical sliders, each with their own options, to create the UI for a music player.</p>
|
---|
74 |
|
---|
75 | </div><!-- End demo-description -->
|
---|
76 |
|
---|
77 | </body>
|
---|
78 | </html>
|
---|