Delay Flyout menu with jQuery

I have a menu built with jQuery and built following the tutorial . I would like to add a delay when the mouse leaves the menu for better user experience. I can get the menu to linger using jQuery delay

and it works fine with one exception: the dropdowns are crashing.

Due to the length of the code, I have a working jsFiddle with code. The dropdown menu I mean contains the words Website

Illustrations

and Photography

.

How do I delay the popup so that it closes when the menu actually disappears right away?

+3


source to share


3 answers


Here is another take on it:

      



jSFIDDLE HERE

+1


source


doTimeout The jQuery plugin is perfect for what you want to do.



Check out these examples .

+1


source


try it

What was it:

$jsub_menu.hide().css('left','0px');

      

now changed to this:

$jsub_menu.delay(100).animate({'left':'0px'},100).hide('100');

      

+1


source







All Articles