Reputation: 23
Hello friends i m new on jquery and trying to develop a drop down menu i am facing some problems . i have three main link and drop down menu would be apear when user hover on services tab but my drop down menu appears on hovering every main tab for demo plz click on the link. i also mentioned my code below
Script
$('.navi_top ul > li').mouseenter(function(){
$('.navi_top ul > li ul').slideDown()});
$('.navi_top ul > li').mouseleave(function(){
$('.navi_top ul > li ul').slideUp()});
When you go through this link i know whats happening. Please help me to solve this ..
Upvotes: 0
Views: 499
Reputation: 74748
Hi in your script you are entering on a link but not sliding the children of the target ul. So you should do this way and this will work perfectly check this out: http://jsfiddle.net/5e3At/2/
$('.navi_top ul li').mouseenter(function(){
$('ul',this).stop().slideDown();
});
$('.navi_top ul li').mouseleave(function(){
$('ul',this).stop().slideUp();
});
Upvotes: 1