javascript - How to show only the first by hover with jQuery? -
if make hover on menulinks submenues on first level shown dont know whats wrong, see code:
$('#menu li').hover(function () { //show submenu $('ul', this).slidedown(100); }, function () { //hide submenu $('ul', this).slideup(100); });
so in opinion must work because hover on link should display first submenu. submenu of first link show directly hover , dont know how fix better yet.
need please.
for better understanging hve created fiddle here.
your selector in hover functions finding ul
elements descendants of li
element. want show direct children. try instead:
$('#menu li').hover(function() { //show submenu $(this).children('ul').slidedown(100); }, function() { //hide submenu $(this).children('ul').slideup(100); });
Comments
Post a Comment