How to know when a pop-down menu needs to be closed
Posted
by Pieter
on Stack Overflow
See other posts from Stack Overflow
or by Pieter
Published on 2010-03-30T09:56:15Z
Indexed on
2010/03/30
10:13 UTC
Read the original article
Hit count: 399
JavaScript
|html
I'm experimenting with pop-down menus (inside floating DIVs). Making them appear with onmouseover
attributes is no problem, but I'm not sure how I can make the menu close properly.
I figured the best way to know when to close the menu is wait until the mouse is no longer hovering over the HTML element that called the menu or the menu itself, then wait one second, and then close the menu.
Is my idea something that can be implemented, perhaps with some jQuery? Or is there a better and more efficient alternative?
© Stack Overflow or respective owner