Other Customize the default JS menu hover

Ludachris

Well-known member
The standard XF popup hover (navigation popup menus, for example) stays displayed forever even when you are no longer hovering over it. It only goes away if you click somewhere on the page. I'd like to change it so that it closes after 'x' seconds when the mouse leaves the menu. Anyone able to help me do this? If you paste some code in here and tell me which file to edit I can do it.
 
Basically just need to call hoverIntent for .Menu and give it a short timeout. Basically any time the mouse hovers over a div with .Menu you can have hoverIntent call jquery to hide the div.

Xenforo uses hoverIntent for the actual drop down but it doesn't call an out. The reason for this is hoverIntent calls the out when the mouse leaves the navtab NOT the menu. What I did for this half is assign an out that checks if the mouse is over a Menu and if not it would close the menu. This only closes the menu if the mouse never went over it. But that covers half the issue and is still necessary its just not actually necessary to edit Xenforo.js. A more talented javascript coder can just override the class I believe.

I am going to be doing this sometime myself in May. Have alot on my plate. This was my initial discussion on adding an out to the hoverIntent for the navtab - http://xenforo.com/community/thread...-for-menu-autoclose-needs-more-ketchup.72536/
 
Top Bottom