You can access full code with github pages link below. Link
I'm developing the Matching game When I click each li selector, class of the li will be change so it can change card open. But I want to make it after 2 second, class of the li selector will change class.
$(document).ready(function () {
$(".card").each(function () {
$(this).click(function () {
$(this).addClass("card open show"); // When click li element class will change to card open show
setTimeout(function(){
$(".card open show").addClass("card");
}, 2000);
});
});
});
when I click the li selector class will change to card open show and I want to make it after 2 seconds class will change to card.
I don't know why it's not working.