[jQuery] mouseover + slide down question
I've set up a horizontal nav and have slide down divs for each element
for the subnav. It works fine for now but when I run over the navs too
fast i notice the subnav divs stay up because it'll wait until the
animation is done before it treats it as a real div...anyways here my
snippet of code here
$("#navcontainer > div").each(function(i){
$("#subNav" + i).css({top: menuYcoord + ycoord + navItemHeight, left:
menuXcoord + xcoord, position: "absolute"});
$("#nav" + i).hover( function() {
$(this).css({background:"url(images/nav_on.gif)", fontWeight:
"bold"});
$("#subNav" + i).slideDown(450);
},function(){
$("#subNav" + i).css({display:"none"});
$(this).css({background:""});
});
$("#subNav" + i).hover(function(){
$(this).css({display:"block"});
$("#nav" + i).css({background:"url(images/nav_on.gif)", fontWeight:
"bold"});
},function(){
$(this).css({display:"none"});
$("#nav" + i).css({background:""});
});
xcoord += navItemWidth;
});
help!