Is there a way to keep a submenu displayed and the background color changed even after moving the mouse away from the menu item onto the submenu?
This is my HTML:
<div class="shoplink"><a>Online Shop</a></div>
<div id="shop-menu">
<ul>
<li>Food</li>
<li>Home & Living</li>
<li>Personal Assistance</li>
<li>Kids</li>
<li>Musical Instruments</li>
<li>Beauty & Wellbeing</li>
<li>Outdoor</li>
<li>Office & Stationery</li>
<li>Cards & Gift Paper</li>
<li><b>Browse All</b></li>
</ul>
</div> <!-- #shop-menu -->
Here is my current JS code:
$('#shop-menu').hide();
$('.shoplink').live('hover', function(e) {
$(this).toggleClass('activeitem');
$('#shop-menu').toggle();
});
I want the shop-menu to remain visible even when I move the mouse away from .shoplink onto the submenu. Any suggestions would be greatly appreciated. Thank you!