I have a menu strip . I planned to :
slideDown()
a submenu ( originallydisplay: none
DIV ) when I mouse over the menu strip- hide the submenu by
slideUp
when mouse out.
Here is the codes:
<div id="main_menu" onmouseover="$('#submenu').stop(true,false).slideDown();" onmouseout="$('#submenu').stop(true,false).slideUp();">Main Menu</div>
<div id="submenu" style="display: none">Some submenu contents here</div>
What I try to achieve is, when I mouseover submenu,the submenu holds and stop the mouse out ( the slideUp()
animation. How can I achieve it ?
Note: given that the main_menu and sub_menu did not overlap.
UPDATE: here is the the jsFiddle