Home › Forums › JavaScript › can anybody help me about JQuery MagicLine Navigation to dropdown menu › Re: can anybody help me about JQuery MagicLine Navigation to dropdown menu
December 30, 2010 at 9:27 am
#68275
Member
The problem with your hover, is the following line
$("ul.group li ul").css('visibility', 'visible');
It is basically saying that if you hover over ANY of the menu items, you should show ALL of the dropdown lists, which is obviously not what you want to do. In Safari your menu does drop down and show the submenu, but the submenu appears in the wrong place and appears whenever you hover over any of the menu items.
You should change this line:
$("ul.group li").find("a").hover(function() {
to:
$("ul.group li a")hover(function() {
then you will want to get the sibling ul for that a. Completely off the top of my head, I think it may be something like:
$(this).siblings("ul").css('visibility', 'visible')