Title: about MenuButton question show/hidden
Post by: hjzhbb7758 on January 16, 2014, 02:25:49 AM
i have a advanced search in menubutton's panel . when i click the combobox ,the menubutton auto hidden and combobox Z-Index is Less than menubutton Z-Index .
Title: Re: about MenuButton question show/hidden
Post by: stworthy on January 16, 2014, 11:59:17 PM
Please try the code below to fix this issue. <script> $(function(){ $(document).unbind('.combo').unbind('.menu') .bind('mousedown.combo', handler) .bind('mousedown.menu', handler); function handler(e){ var d = $(e.target).closest('span.combo,div.combo-p,div.menu'); if (d.hasClass('combo-p')){ d.find('.combo-f').each(function(){ var p = $(this).combo('panel'); if (p.is(':visible')){ p.panel('close'); } }); return; } else if (d.hasClass('combo')){ return; } else if (d.hasClass('menu')){ return; } else { $('body>div.combo-p>div.combo-panel:visible').panel('close'); $('body>div.menu-top:visible').menu('hide'); } } }); </script>
The usage example: <a href="#" class="easyui-menubutton" data-options="menu:'#mm1'">Search</a> <div id="mm1" class="menu-content" data-options="hideOnUnhover:false"> <select class="easyui-combobox" data-options=" onShowPanel:function(){ $(this).combobox('panel').panel('panel').css('z-index',$.fn.menu.defaults.zIndex++); } "> <option>Item1</option> <option>Item2</option> <option>Item3</option> </select> </div>
Title: Re: about MenuButton question show/hidden
Post by: hjzhbb7758 on January 19, 2014, 08:18:52 PM
nice job . It‘s work . thank you.
|