This should work, everything in one bind:
$(".slide a").click(function(){
$(this).toggleClass("active").parent().siblings().slideToggle("slow");
return false;
});
If you could change the html up a bit (no numbering even!), say:
<li><div class="slide"><a href="#">One</a></div><div class="panel"></div></li>
You could have a more precise:
$(".slide a").click(function(){
$(this).toggleClass("active").closest("li").find(".panel").slideToggle("slow");
return false;
});
Nick Craver
2010-02-18 03:12:08