multiple-vertical.html 1.8 KB

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