+1 vote
by
$(function () {
$('.answers_toggle').click(function() {

$('#answers_text').slideToggle( function() {

});
$(this).toggleClass("active");
});
});
5fa05ff391bc7552094581.jpeg

1 Answer

0 votes
by
 
Best answer
Depending on the markup. For example, if a block of text is immediately below the header:
$(function () {
$('.answers_toggle').click(function() {
$(this).toggleClass('active').next('.answers_text').slideToggle();
});
});
And change the text id to a class
...