MouseEnter/MouseLeave Triggering Prematurely with Custom Tiered Menu using QTip2 Jquery Library

て烟熏妆下的殇ゞ 提交于 2019-12-11 04:34:58

问题


I have been battling to find the error in my adaptation of the QTip2 Demo-menu for over a month now. My implementation is working great with the exception of only 2 remaining problems. Both are detailed below with a Fiddle. I really hope someone can help so that I can wrap up this project.

The 2 problems: http://jsfiddle.net/UGQ95/10/

The 'Tier 1' menu opens correctly and persists correctly whenever the user is not using the menu. This means that whenever the user has completed hovering any menu items, it returns to indicate the users current item. The behaviour of the menu is currently correct, holding open 'Tier 1' and 'Tier 2', whilst 'Tier 3' (if there is one) is highlighted on hover, but remains hidden until hovered.

Problem 1. You will notice the top tier, 'Tier 1', tries to force itself to the 'alwaysactive' item immediately on mouseleave when moving between 'Tier 1' items. I believe this is caused by the mouseleave trigger on the #navigation triggering prematurely. This JS is found in the last 10 lines.

Problem 2. In the fiddle provided, you will notice I have set 'Tier 1 - Maintenance', 'Tier 2 - Bus Stops', and 'Tier 3 - Create Bus Stop' to being the active page. When hovering the other 'Tier 2' items alongside 'Bus Stops', I cannot get the 'Tier 2' active item to lose its highlighting, until it needs to return to being shown as active.

Thanks so much if any of you can help! I really hope I was able to illustrate my problems clearly.

Cheers Devin

来源:https://stackoverflow.com/questions/10878726/mouseenter-mouseleave-triggering-prematurely-with-custom-tiered-menu-using-qtip2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!