How do I make it from the 2nd click and find the active class, delete it

0

How do I make it from the 2nd click and find the class active , delete it

$('.siniestros button').click(function () {

    $('.siniestros>button>.before').addClass('active');

    $('.siniestros>.preguntas').slideToggle('fast',function(){

    });


})
    
asked by Luis Morales Ponce 18.04.2018 в 00:43
source

1 answer

1

If I understood what you want to do, you can use this:

$('.siniestros button').click(function () {

    $('.siniestros>button>.before').toggleClass('active');

    $('.siniestros>.preguntas').slideToggle('fast',function(){

    });

})
    
answered by 18.04.2018 / 01:07
source