diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-12-27 17:23:25 +0100 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-12-27 17:23:25 +0100 |
commit | 2c3d311f90281e95827708e2e8d0e52832a437de (patch) | |
tree | 794159b476f9a9debf101d3f3ff57f38223eb2f9 /ui/jquery.ui.menu.js | |
parent | 0d53fbfd0b7651652601b3b8577225ab753aab44 (diff) | |
download | jquery-ui-2c3d311f90281e95827708e2e8d0e52832a437de.tar.gz jquery-ui-2c3d311f90281e95827708e2e8d0e52832a437de.zip |
Menu: Allow changing icons option after creation. Fixes #8927 - Menu: Can't change icons option after init
Diffstat (limited to 'ui/jquery.ui.menu.js')
-rw-r--r-- | ui/jquery.ui.menu.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index 7f37b6b06..8d99272d0 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -343,6 +343,15 @@ $.widget( "ui.menu", { }[ this.options.role ]; }, + _setOption: function( key, value ) { + if ( key === "icons" ) { + this.element.find( ".ui-menu-icon" ) + .removeClass( this.options.icons.submenu ) + .addClass( value.submenu ); + } + this._super( key, value ); + }, + focus: function( event, item ) { var nested, focused; this.blur( event, event && event.type === "focus" ); |