I have a toggle effect that opens and closes a div, and in that effect I put it to add a class and remove it. It adds the class, but is not removing it. Because?
JQuery
$j('.filters__filter.tamanho').click(function(){ $j('.filters__filter.tamanho .ul--0').slideToggle(150); //remove class active $j('.filters__filter.tamanho').removeClass('active'); //adiciona class active ao item clicado $j('.filters__filter.tamanho').addClass('active'); });
If I click again, class active