aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.spinner.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.spinner.js')
-rw-r--r--ui/jquery.ui.spinner.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js
index c022413dc..644b65239 100644
--- a/ui/jquery.ui.spinner.js
+++ b/ui/jquery.ui.spinner.js
@@ -381,9 +381,13 @@ $.widget( "ui.spinner", {
this._super( key, value );
if ( key === "disabled" ) {
- this.widget().toggleClass( "ui-state-disabled", !!value );
- this.element.prop( "disabled", !!value );
- this.buttons.button( value ? "disable" : "enable" );
+ if ( value ) {
+ this.element.prop( "disabled", true );
+ this.buttons.button( "disable" );
+ } else {
+ this.element.prop( "disabled", false );
+ this.buttons.button( "enable" );
+ }
}
},