I’m trying to add a dynamic page accordion and I don’t think I am targeting my selectors correctly. This is my code:
$(document).ready(function()
{//hide child page
$('#content ul.menu ul li').hide();
//when navigate to a child page show all pages
$('#content ul.menu li.current-menu-item').parent("ul").show();
//show page list when toggle
$('#content ul.menu ul li.active ul').show();
//show cerrent page's child page
$('#content ul.menu ul li.current-menu-item ul').show();
$('#content .menu ul li').click(function() {
$(this).addClass("active");
$(this).children('ul').slideToggle("slow");
});
});
and my site: http://www.svadsi.info.
Thanks in advance for any help!!!