Selectmenu: improve _setOption to make it possible to change icons option after init

This commit is contained in:
Felix Nagel 2012-12-20 00:16:37 +01:00
parent 84621940bf
commit 50d7a969a5

View File

@ -382,6 +382,12 @@ $.widget( "ui.selectmenu", {
}, },
_setOption: function( key, value ) { _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 ); this._super( key, value );
if ( key === "appendTo" ) { if ( key === "appendTo" ) {