jquery - Why the sub links won't work? -
i have problem links in slidedown menu.
the link's aren't clickable why?
you can see here: jsfiddle
my jquery code is:
$('.links').hide(); $('.header a').click(function(e) { $(this).next('.links').slidetoggle('normal'); e.preventdefault(); });
your selector .header a
affect anchors contained within .header
, don't want. want toggle()
when anchor, direct child of .header
clicked.
$('.header > a').click(function(e) { e.preventdefault(); $(this).next('.links').slidetoggle('normal'); });
Comments
Post a Comment