Hi i created accordion function using jquery by toggleClass function.
here while clicking accordion class a active class will added to the same class i added some styles to active class for displaying child classes.Now the problem is the accordion toggled if we click anywhere of accordion class or its child classes whats wrong on it?
my JS
$('.accordion').on('click', function() {
$(this).toggleClass('active');
});
.accordion, be more specific with your selector