mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Button: remove disabled attribute from original element when option set to false
This commit is contained in:
parent
a842215fdb
commit
e3096c7abb
6
ui/jquery.ui.button.js
vendored
6
ui/jquery.ui.button.js
vendored
@ -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();
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user