Permalink
Browse files

Selectmenu: improve _setOption to make it possible to change icons op…

…tion after init
  • Loading branch information...
fnagel committed Dec 19, 2012
1 parent 8462194 commit 50d7a969a52d4aa1a6c8ae8a3013374fc24aabe1
Showing with 6 additions and 0 deletions.
  1. +6 −0 ui/jquery.ui.selectmenu.js
@@ -382,6 +382,12 @@ $.widget( "ui.selectmenu", {
},
_setOption: function( key, value ) {
+ if ( key === "icons" ) {
+ this.button.find( "span.ui-icon" )
+ .removeClass( this.options.icons.button )
+ .addClass( value.button );
+ }
+
this._super( key, value );
if ( key === "appendTo" ) {

0 comments on commit 50d7a96

Please sign in to comment.