From e3096c7abb24a9a3fa748a1c10bb2cd31e74cf94 Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Mon, 15 Mar 2010 14:07:00 +0000 Subject: [PATCH] Button: remove disabled attribute from original element when option set to false --- ui/jquery.ui.button.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(); }, -- 2.39.5