Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Javascript to remove the pressed class after a 100 milliseconds

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

    var self = $(this);

    self.addClass("bg1");

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

});
 
PREVIOUS NEXT
Tagged: #Javascript #remove #pressed #class #milliseconds
ADD COMMENT
Topic
Name
1+2 =