diff options
Diffstat (limited to 'ui/jquery.ui.button.js')
-rw-r--r-- | ui/jquery.ui.button.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index fcb7b14d1..5e64f5164 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -207,9 +207,6 @@ $.widget( "ui.button", { } } - // TODO: pull out $.Widget's handling for the disabled option into - // $.Widget.prototype._setOptionDisabled so it's easy to proxy and can - // be overridden by individual plugins this._setOption( "disabled", options.disabled ); this._resetButton(); }, @@ -273,11 +270,8 @@ $.widget( "ui.button", { _setOption: function( key, value ) { this._super( key, value ); if ( key === "disabled" ) { - if ( value ) { - this.element.prop( "disabled", true ); - } else { - this.element.prop( "disabled", false ); - } + this.widget().toggleClass( "ui-state-disabled", !!value ); + this.element.prop( "disabled", !!value ); return; } this._resetButton(); |