A classe de verificação existe no elemento por identificação pai no jQuery
$(this).parent().find('.accordion-body').length == 1;
or you can use hasClass()
Ankur
$(this).parent().find('.accordion-body').length == 1;
or you can use hasClass()