Reputation: 3414
i am creating navigation menus like this site http://demo.megathe.me/skylab/ and i m completely lost after reaching this http://jsfiddle.net/jxU95/. Any help? this is my js code
$('#main-menu li.expanded > a').hover(function(){
$(this).next().show('slow');
},
function(){
// $(this).next().hide();
}
);
Upvotes: 0
Views: 65
Reputation: 148150
You can do it with some like this,
$('#main-menu li.expanded').hover(function () {
// $('#main-menu ul ul').hide();
$(this).find('.menu').show('slow');
}, function () {
$(this).find('.menu').hide();
});
Upvotes: 1
Reputation: 3144
try this code in js http://jsfiddle.net/jxU95/1/
$('#main-menu li.expanded').hover(function(){
$(this).find('ul').stop(true,true).show('slow');
},
function(){
$(this).find('ul').stop(true,true).delay(300).hide('slow');
}
);
Upvotes: 1