The Code
Basic nav bar made from a table in html. When the menu item "cakes" is hovered i want a dropdown list called "sub-links" to appear. Which it does.
The Question
I wana keep the dropdown list shown when its focused, but as soon as it looses focus i want it to hide.
Code:
//Toggle sub-menu
$('.sub-links').hide();
$('.NavBar').find('#cakes').hover(function(){
$('.sub-links').show();
//if the sub menu has focus then show it, if not then hide it
if($('sub-links').focus=false){
$(this).hide();
}
});
Thank You