After 5 seconds, I need to simulate a click on a button.
var count = 5;
countdown = setInterval(function () {
$("#count").html(count);
if (count == 0) {
alert("Jotain pitäis tapahtua. kai");
//What should I put instead of this line?
}
count--;
}, 1000);
return false;
Is it even possible?
setInterval's second parameter is in milliseconds, so it should be1000*5