toggle might be a bit vague
Seems like toggle
is going the wrong direction for you in some cases, and you want to make sure you let it know when you want it to show and hide explicitly to avoid confusion.
If you use hover for on and off, it shouldn't run into these issues.
You're also toggling .sub-menu
and its child .nav-info
, you should only need to toggle .sub-menu
; the child comes with it.
$('.navigation li').hover(function () {
$(this).children('.sub-menu').show();//hover on
}, function () {
$(this).children('.sub-menu').hide();//hover off
});
made a fiddle: http://jsfiddle.net/filever10/kYmfJ/