i have a slider whose code is
var jq = jQuery.noConflict();
jq(document).ready(function(){
jq("a.zootoggle").click(function () {
jq(this).parent().next('div.zoocontent').slideToggle('slow', function() {
jq("a.zootoggle").parent().toggleClass('active', jq(this).is(':visible'));
});
return false;
});
})
the html
<h3><a class="zootoggle">openme</a></h3>
<div class="zoocontent>content here</div>
<h3><a class="zootoggle">openme</a></h3>
<div class="zoocontent>content here</div>
this works in that it opens the correct box when clicked (the next sib of the clicked h3 containing a) but it then applies the active class to all the h3’s not just the one clicked. i would like the active class to only apply to the current h3.
Would this work?