I have a div where, when I click on it, it adds a “game” class. Then, after 10 seconds, I want to add a "finished" class.
I have this code, but how to do it, so after 10 seconds it adds the finsihed class?
$('.albums img').on('click',function(){
$(this).addClass('playing');
});
Any help is appreciated!
Thanks a ton to everyone. I used this question to show ~ 30 students at HackerYou how to use stackoverflow to get the fastest help from the community.
source
share