while applying slideToggle function the links are not working. below is the link for my demo site.
http://codezigns.com/teyseer_laboratory/htm/toggle.html
my script is
$(".nav li > a").click(function(e) {
$(this).parent().siblings().find('ul').slideUp(500);
$(this).next('ul').stop().slideToggle(300);
return false;
});
and also include
$(".trigger").click(function(e) {
e.preventDefault();
$(".main-nav > ul").slideToggle(300);
});
Link is applied in parent item “Tutorial” and child item “Photoshop”.
3
Answers
Remove
return false;
from youra
click
event. It is preventing redirection.This is happening because you are returning false on
a
click event, you should exclude the links from returning false, you should add a class to the real links and exclude them of your function:HTML
JS:
Hope it helps
The problem is you are returning
false
for eacha
click. Try like following. Hope this will help you.