I have a site where the last item in the navigation, when you hover, will toggle a hidden div. I'm trying to create a "super nav" of sorts. The problem I'm having is getting the div to hide on mouse out. Here is a sample of the code I have.
<ul id="nav_14623">
<li>
<a href="/index.htm">Home</a>
</li>
<li class="locations">
<a href="/locations.htm">Locations</a>
</li>
</ul>
When the user mouses over "Locations", I'd like the div "locationsSuperNav" to show.
<div id="locationsSuperNav" style="display: none;"> Location Content goes here
<div id="superNavLeft"></div>
Here is the jquery
$('li#locations a').hover(function () {
$('#locationsSuperNav').toggle('medium');
The problem I am facing is getting the #locationsSuperNav to hide when the user mousesout of that space. The div is 475px wide by 140px high. This is the code I tried for the mouseout event. What is happening is the div toggles right away when the cursor enters the div.
$('#locationsSuperNav').mouseout(function () {
$('#locationsSuperNav').hide();
Anyone have a suggestion on how to hide the div on mouseout?
Thanks.