Jquery - Get all other menus to slide up
- by Jova
I have a drop down menu made with Jquery.
Right now, if you hover over all the menu items, their submenus will all show at the same time.
I would like that if I hover over one menu, then go to the next, that the previous menu's submenu will slide back up. As it is now, I have to hover out of the submenus for them to slide up.
To put it simpler, when hovering over a parent menu, slide up all other parent menu's submenus if they're open.
$("#DropDownMenu li.parent").hover(function() {
$(this).find(".subMenu").slideDown('fast').show();
$(this).parent().find(".subMenu").hover(function() {
}, function() {
$(this).parent().find(".subMenu").slideUp('slow');
});
});