I want to add class “active” in existing jQuery code I’m not quite good in jQuery I try but I’m not lucky enough.
i want to add class “active” for active state
I have a sample here
$(function() {
$('#arrow').click(function() {
$('.toggleContent').slideToggle('fast');
return false;
});
});
To add it to the arrow that was clicked, use
$(this):