how can I use 'next' in this case? Doesn't work...
var that = $( ".class" ).next( "p" );
if (that.hasClass('active')) {
that.slideUp('slow', function () {
that.removeClass('active');
});
}
This should show the case: https://jsfiddle.net/4Lmuydak/