In jquery we do it with delay method. But what can I use to delay the css with javascript?
document.querySelector(".alert_display").style.display = "block";
I tried it like this:
setTimeout(function(){
document.querySelector(".alert_display").style.display = "block";
},5000);
But seems wrong way?
Update:
I found my problem:
document.querySelector(".img-ball").style.animationPlayState = "running";
setTimeout(function(){
document.querySelector(".alert_display").style.display = "block";
},5000);
setTimeout(function(){
setTimeout(function(){
jconfirm("DO you want to go for next Questions?");
}, 200);
}, 500); // the '500' here is the problem was occurred and changed to 5000 then its okay now
Any idea, why this happened?