Question about logics here:
What’s the most elegant way to make the menu appear/disappear onmouseover/onmouseout?
See the following JsBin:
http://jsbin.com/owayeb/edit#source
The Menu is hidden by default.
If the user moves his cursor above the Link the showme() function gets called.
When the user moves his cursor away the hideme() functions gets called.
How would I get the Menu to persist while the user moves his mouse away from the Link to above the Menu?
Or is this all the wrong school of thought?
Assuming this is for cascading navigation or something similar, I would do something like…
Within the onmouseover state of your list items, you would add the .selected class to #nav thus causing all child UL’s to be displayed. Because the child UL elements are within ul#nav, your hover state will still be active while you’re rolling over the children.
You’ll obviously need to tweak the CSS to match the desired look you want, but that’s the general idea. If you were using prototype js for example, your javascript would look something like…