I´m developing a “UL” menu.
It is a vertical menu. Each link of this vertical menu has a submenu.
The menu elements have a onmouseout event, that removes the submenu.
The problem I´m facing is:
When I try to access the submenu, the onmouseout event is dispatched before I get into the submenu.
There are a space (margin) between the menu and submenu. I believe, that, when the mouse reach this space, the “onmouseout” event is dispatched.
What can I do, so the “onmouseout” is not dispatched when the mouse is on this “space” between the menu and the submenu?
Thanks.
PS: I cannot post the code
What I do in such situations is to have a short
setTimeoutbefore removing the submenu, then clear that timeout when the submenu is moused over. This allows enough time for the mouse to get there, without affecting the visuals much, if at all.