On 4/18/07, dailo <[EMAIL PROTECTED]> wrote:


actually i was just thinking of a workaround..is there a way to put a
delay on the slidedown? Or i guess a delay on a mouseover

On Apr 18, 1:09 pm, dailo <[EMAIL PROTECTED]> wrote:
> 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!



You might consider a menu plugin.  (this is a popular plugin topic)

  1. http://jdsharp.us/code/jQuery/plugins/jdMenu/ (Full featured)
  2. http://be.twixt.us/jquery/suckerFish.php (This one is pretty
  simple, but elegant)
  3. http://users.tpg.com.au/j_birch/plugins/superfish/  (like above but
  with more stuff)


Pause Plugin to delay animations
http://www.mythin.net/projects/jquery.php

Glen

Reply via email to