jQuery how to remove an added class after a certain time,
jQuery how to animate buttons
xxxxxxxxxx
// in this example I'm animating a button using jquary
// initially I have selected the button that I want to animate
// You can chose any selector you wand ether HTML tag or a class or an id
var buttonPressed = $("#blue")
// Next I added the CSS class that I have already crated in my
// CSS style sheet
buttonPressed.addClass("pressed");
// This is the part where i removed the addded class
// after 100ms of adding in order to animate the button
setTimeout(function() {
buttonPressed.removeClass("pressed");
}, 100);
.pressed {
box-shadow: 0 0 20px white;
background-color: grey;
}
this is the CSS class I have applied in this example.