diff options
author | Felix Nagel <info@felixnagel.com> | 2012-01-22 14:47:21 +0100 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2012-01-22 14:47:21 +0100 |
commit | 21d96f12f802f13c4c159ab9b2e0a6df3771be42 (patch) | |
tree | c74f69270a62bc8a99e175bd3a94c7bc18433a48 /ui/jquery.ui.button.js | |
parent | 725023e30db10cc0a3ec2b8b9fda0ec80a4ab496 (diff) | |
parent | 6800e1a2f97a7d8aaf20d065aa2ce517528e5068 (diff) | |
download | jquery-ui-21d96f12f802f13c4c159ab9b2e0a6df3771be42.tar.gz jquery-ui-21d96f12f802f13c4c159ab9b2e0a6df3771be42.zip |
Merge branch 'master' of github.com:jquery/jquery-ui into selectmenu
Diffstat (limited to 'ui/jquery.ui.button.js')
-rw-r--r-- | ui/jquery.ui.button.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 18a950563..1c3cf2c64 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -58,7 +58,9 @@ $.widget( "ui.button", { .bind( "reset.button", formResetHandler ); if ( typeof this.options.disabled !== "boolean" ) { - this.options.disabled = this.element.prop( "disabled" ); + this.options.disabled = !!this.element.prop( "disabled" ); + } else { + this.element.prop( "disabled", this.options.disabled ); } this._determineButtonType(); @@ -74,10 +76,6 @@ $.widget( "ui.button", { options.label = this.buttonElement.html(); } - if ( this.element.is( ":disabled" ) ) { - options.disabled = true; - } - this.buttonElement .addClass( baseClasses ) .attr( "role", "button" ) |