]> source.dussan.org Git - jquery-ui.git/commitdiff
Slider demo: Don't change default values.
authorScott González <scott.gonzalez@gmail.com>
Fri, 5 Feb 2010 02:30:48 +0000 (02:30 +0000)
committerScott González <scott.gonzalez@gmail.com>
Fri, 5 Feb 2010 02:30:48 +0000 (02:30 +0000)
Fixes #5131 - Slider demos need options reset before loading next demo.

demos/slider/multiple-vertical.html

index 6e6a1e281eff430f8780364b92b2d6699226ad37..dc5de17faebf9ce65e673b8016c53f633c5343b1 100644 (file)
        </style>
        <script type="text/javascript">
        $(function() {
-               // change defaults for range, animate and orientation
-               $.extend($.ui.slider.prototype.options, {
-                       range: "min",
-                       animate: true,
-                       orientation: "vertical"
-               });
                // setup master volume
                $("#master").slider({
                        value: 60,
-                       orientation: "horizontal"
+                       orientation: "horizontal",
+                       range: "min",
+                       animate: true
                });
                // setup graphic EQ
                $("#eq > span").each(function() {
                        // read initial values from markup and remove that
                        var value = parseInt($(this).text());
-                       $(this).empty();
-                       $(this).slider({
-                               value: value
-                       })
+                       $(this).empty().slider({
+                               value: value,
+                               range: "min",
+                               animate: true,
+                               orientation: "vertical"
+                       });
                });
        });
        </script>