From 50d7a969a52d4aa1a6c8ae8a3013374fc24aabe1 Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Thu, 20 Dec 2012 00:16:37 +0100 Subject: [PATCH] Selectmenu: improve _setOption to make it possible to change icons option after init --- ui/jquery.ui.selectmenu.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 88b351a12..730c46d19 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/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" ) {