I have a level 2 dropdown menu, where the mouse have to travel a pretty narrow corridor to keep the menu open, and if it gets off the track, the menu closes unexpectedly, this is frustrating. I want to make the menu not to close immediately, but with a delay.
it is a standard menu made with css like tis:
ul.menu li ul {
display: none;
}
ul.menu li:hover ul {
display:block;
}
I need when there is no more in hover state, the menu to still be visible for at least 0.5 seconds.
have tryed this, but it is not working:
<script>
$( ".menu li" ).mouseout(function() {
$(".menu li ul").css("display: block");
$(".menu li ul").css.setTimeout("display: none", 2000);
});
</script>