Jquery - Get all other menus to slide up
Posted
by Jova
on Stack Overflow
See other posts from Stack Overflow
or by Jova
Published on 2010-04-13T10:45:38Z
Indexed on
2010/04/13
10:53 UTC
Read the original article
Hit count: 413
jQuery
|dropdown-menu
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');
});
});
© Stack Overflow or respective owner