I have a simple .slideDown function:
$globalTabs.find('.seeMore a').live("click", function(){
$globalTabs.find(".allTabs").slideDown('slow');
});
When a user clicks on an <a> in .allTabs ,.allTabs does a .slideUp.
What I want to do, is if a user has not clicked anything in .allTabs and the mouse is no longer within .allTabs, then a timer initiates to wait x amount of time and then do the .slideUp. Additionally, if the mouse enters .allTabs again before the .slideUp triggers – then the timer is stopped and resets when the mouse is moved outside of .allTabs
Not sure how to approach. Any help would be appreciated.
base markup:
<div class="allTabs">
<a href="#">link 1</a>
<a href="#">link 2</a>
<a href="#">link 3</a>
<a href="#">link 4</a>
</div>
and:
<li class="seeMore"><a href="#">see more</a></li>
Try this way: