<ul id="mainNav">
<li> <a href="#" class="greenTheme">MainNav</a>
<ul class="subNav gTheme">
<li class="first"><a href="#">SubNav1</a><span></span></li>
<li><a href="#">SubNav2</a><span></span></li>
</ul>
</li>
</ul>
I am developing a dropdown menu with jQuery hover function. I need to put delay on the hide function. I am using the following piece of code.
//Show/Hide
$('#mainNav > li').each(function(e){
$(this).hover(function(){
$(this).find('ul.subNav').show();
}, function(){
$(this).find('ul.subNav').delay(100000).hide();
});
});
I used the delay function here but it is not working as expected. Please help. Thanks in advance.