Button: remove disabled attribute from original element when option set to false

This commit is contained in:
Richard Worth 2010-03-15 14:07:00 +00:00
parent a842215fdb
commit e3096c7abb

View 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();
},