diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-12-27 12:50:04 +0100 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-12-27 12:50:04 +0100 |
commit | 04d668b7171e14292af9f4de1b6bfbbe1a6e990c (patch) | |
tree | f7578b7c5d17b9d8c75ff4dfa3b001dcd0f162bd /ui | |
parent | 0d4022bceb33fb95c41fab768c1829d464861899 (diff) | |
download | jquery-ui-04d668b7171e14292af9f4de1b6bfbbe1a6e990c.tar.gz jquery-ui-04d668b7171e14292af9f4de1b6bfbbe1a6e990c.zip |
Spinner: Update button icons when option changes. Fixes #8926 - Spinner: Can't change icons option after init
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.spinner.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js index 406eefb91..aeffe0a3e 100644 --- a/ui/jquery.ui.spinner.js +++ b/ui/jquery.ui.spinner.js @@ -368,6 +368,14 @@ $.widget( "ui.spinner", { value = this._parse( value ); } } + if ( key === "icons" ) { + this.buttons.first().find( ".ui-icon" ) + .removeClass( this.options.icons.up ) + .addClass( value.up ); + this.buttons.last().find( ".ui-icon" ) + .removeClass( this.options.icons.down ) + .addClass( value.down ); + } this._super( key, value ); |