]> source.dussan.org Git - jquery-ui.git/commitdiff
Button: remove disabled attribute from original element when option set to false
authorRichard Worth <rdworth@gmail.com>
Mon, 15 Mar 2010 14:07:00 +0000 (14:07 +0000)
committerRichard Worth <rdworth@gmail.com>
Mon, 15 Mar 2010 14:07:00 +0000 (14:07 +0000)
ui/jquery.ui.button.js

index ec7008dd56e2f8469990dc7436076be354b58149..854fdc8e3639b634b26d57b60c2f6d80d3c2d317 100644 (file)
@@ -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();
        },