0
I need to develop an accordion menu and am having problems with the click event. My script:
$(document).ready(function(){
$('.dropdown').click(
function(){
$(this).find("ul").slideToggle();
return false;
}
);
});
Slidetoggle calls an unordered list that sits inside an LI element. It works perfectly, but the list links stop redirecting. When I click on any of them, the slideToggle() simply undoes, the menu returns to the original state and I am not redirected. Where I am missing?
Could you include a demo of the menu structure? I believe it may be a problem regarding the propagation of the
click
.– Wakim
Enter this as part of the HTML of your question
– Erlon Charles
@Pedrovinícius, could also include the element with class
dropdown
? I think it helps to discover the problem :)– Wakim
@Wakim, the menu code is automatically generated by WP. But if you can take a look at the source code on the site, follow the link: http://conscienciaestelar.filosofiaesoterica.com.br It is the menu on the left that is with this problem :/
– Pedro Vinícius
@Pedrovinícius, ok, I’ll take a look
– Wakim