How to delay hiding of a menu with Jquery Dropdown Menu?
Posted
by Keith Donegan
on Stack Overflow
See other posts from Stack Overflow
or by Keith Donegan
Published on 2010-06-03T13:55:37Z
Indexed on
2010/06/03
14:04 UTC
Read the original article
Hit count: 250
I have a dropdown menu that works fine, but I would like it so, that if I hover off the menu, it doesn't immediately hide again. So basically I would like a one second delay.
I have read about setTimeout, but not sure if it is what I need?
$('#mainnav a').bind('mouseover', function()
{
$(this).parents('li').children('ul').show();
});
$('#mainnav a').bind('mouseout', function()
{
$(this).parents('li').children('ul').hide();
});
© Stack Overflow or respective owner