aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2010-03-15 14:07:00 +0000
committerRichard Worth <rdworth@gmail.com>2010-03-15 14:07:00 +0000
commite3096c7abb24a9a3fa748a1c10bb2cd31e74cf94 (patch)
tree8eb764111ecffee2ca5cf86b75bffdc1ba634b23
parenta842215fdb709378e93411cecf253777d0fb721a (diff)
downloadjquery-ui-e3096c7abb24a9a3fa748a1c10bb2cd31e74cf94.tar.gz
jquery-ui-e3096c7abb24a9a3fa748a1c10bb2cd31e74cf94.zip
Button: remove disabled attribute from original element when option set to false
-rw-r--r--ui/jquery.ui.button.js6
1 files changed, 5 insertions, 1 deletions
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();
},