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