为什么选择下拉菜单不允许我在 IE 中单击某个项目,但在 Firefox、Chrome 等中却可以正常工作?
我正在使用 jquery mega 下拉菜单插件。在其中一个菜单中,我想添加一个下拉框。它在 Firefox、Chrome 中工作正常(如下面的屏幕截图所示)
但在 IE 中,当我单击选择下拉列表并将鼠标悬停在选择中的一个项目上超过一秒,整个菜单消失(就好像它认为我不再将鼠标悬停在菜单上一样。
有关如何在 jquery mega 菜单上显示选择下拉菜单的任何建议
I am using the jquery mega dropdown menu plugin. In one of the menus, I wanted to add a dropdown box. It works fine in Firefox, Chrome (as seen in screenshot below)
but in IE, when i click on the select dropdown and hover over one of the item in the select for more than a second, the whole menu disappears (as if it thinks that i am no longer hovering over the menu.
I am able to reproduce the issue on this example (click on "Sales")
Any suggestions on how to get a select dropdown showing up on jquery mega menu
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您使用哪个版本的 IE 遇到问题?它在 IE7 和 IE8 中工作正常 - 请参阅“销售”子菜单:
编辑链接:
http://www.designchemical.com/lab/jquery-plugins/jquery-mega-drop-down-menu/menu2.html
Which version of IE are you having problems with? It works OK in IE7 and IE8 - see sub-menu for "Sale":
LINK EDITED:
http://www.designchemical.com/lab/jquery-plugins/jquery-mega-drop-down-menu/menu2.html
问题的原因是插件代码本身。问题:IE 不将其“选择元素”视为实际选择选项的一部分。
将其添加到您的 jquery 代码中应该可以解决问题:
请随时通知我。
The cause of your issue is the plugin's code itself. The probelm: IE does not consider its "select elements" as part of the actual select option.
Adding this to your jquery code should solve the problem:
Please keep me posted.
我猜想,当您单击选择框时,IE 会假设您已从下拉菜单中离开焦点,因此它会尝试隐藏菜单。您必须修复库代码以验证您不再将鼠标悬停在菜单上并且选择框没有焦点。首先从函数开始。在隐藏菜单之前先执行检查。
I would guess IE assumes you have left focus from the drop-down menu when you click on a select box, so it tries to hide the menu. You'll have to fix the library code to verify that you are no longer hovering over the menu AND a select box does not have focus. One place to start is the function. Perform your checks first before hiding the menu.