How would I go about making it so the window closes automatically after the timer goes to zero?
Here's the countdown code:
function countDown(){
seconds--
$("#seconds").text(seconds);
if (seconds === 0){
clearInterval(i);
}
}
var seconds = 5,
i = setInterval(countDown, 1000);