]> source.dussan.org Git - jquery-ui.git/commitdiff
Slider: Remove redundant handling of disabled option on create
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 21 Sep 2015 11:04:08 +0000 (13:04 +0200)
committerScott González <scott.gonzalez@gmail.com>
Fri, 25 Sep 2015 17:47:11 +0000 (13:47 -0400)
Ref #9151
Ref gh-1599

ui/widgets/slider.js

index 5c4f252d596345afeb0a46a2f811c613d37cfae2..8b8a7292af71439107246a453d4f7ae52068173e 100644 (file)
@@ -81,7 +81,6 @@ return $.widget( "ui.slider", $.ui.mouse, {
                        "ui-widget ui-widget-content" );
 
                this._refresh();
-               this._setOption( "disabled", this.options.disabled );
 
                this._animateOff = false;
        },
@@ -430,10 +429,6 @@ return $.widget( "ui.slider", $.ui.mouse, {
                        valsLength = this.options.values.length;
                }
 
-               if ( key === "disabled" ) {
-                       this._toggleClass( null, "ui-state-disabled", !!value );
-               }
-
                this._super( key, value );
 
                switch ( key ) {
@@ -481,6 +476,12 @@ return $.widget( "ui.slider", $.ui.mouse, {
                }
        },
 
+       _setOptionDisabled: function( value ) {
+               this._super( value );
+
+               this._toggleClass( null, "ui-state-disabled", !!value );
+       },
+
        //internal value getter
        // _value() returns value trimmed by min and max, aligned by step
        _value: function() {