Answers for "apply class and removing it after miliseconds"

0

apply class and removing it after miliseconds

$('.box').on('click', function(){

    var self = $(this);

    self.addClass("bg1");

    setTimeout(function(){
        self.removeClass("bg1");
    }, 500);

});
Posted by: Guest on June-06-2021

Browse Popular Code Answers by Language