I have the following script which handles the sliding down a submenu:
$('#nav li #bottom').hover(function() {
$(this).closest('#nav li').find('#sub_nav').slideDown("slow");
},
function() {
$(this).closest('#nav li').find('#sub_nav').slideUp("slow");
});
The script is written in this way so that the slidedown will only be triggered when the user hovers over one of the divs within the nav list items, i.e. #bottom.
The trouble I am having is that though the slide down works fine, the menu slides up when the user hovers over the submenu and, of course, I don’t want the submenu to slide up until the mouse/cursor leaves #nav li #bottom or #sub_nav.
I have created a jsfiddle here so that you can see the menu in action.
SCREENSHOT OF STRUCTURE OF NAV ITEM

you can wrap the
#sub_navbydiv#wrapper, this waysub_menuis a part of bottom:also you can use
stop()method:DEMO