From: Richard Worth Date: Mon, 15 Mar 2010 14:07:00 +0000 (+0000) Subject: Button: remove disabled attribute from original element when option set to false X-Git-Tag: 1.8~33 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e3096c7abb24a9a3fa748a1c10bb2cd31e74cf94;p=jquery-ui.git Button: remove disabled attribute from original element when option set to false --- diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index ec7008dd5..854fdc8e3 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -230,7 +230,11 @@ $.widget( "ui.button", { _setOption: function( key, value ) { $.Widget.prototype._setOption.apply( this, arguments ); if ( key === "disabled" ) { - this.element.attr("disabled", value); + if ( value ) { + this.element.attr( "disabled", true ); + } else { + this.element.removeAttr( "disabled" ); + } } this._resetButton(); },