I’m having a strange issue with IE8 and below where my countdown that’s only supposed to fire once, keeps fireing each time an input is selected, something that doesn’t happen in modern browsers. The goal is to have a countdown start once an input is selected. Is there any way to fix this? Thanks!
Code:
$("input").focus (function counter() {
$("input").unbind('focus', counter);
var count = 60;
countdown = setInterval(function(){
$(".countdown p").html(count);
if (count == 0) {
$(".while-ticking").fadeOut(1000);
$(".countdown-finished").fadeIn(1000);
}
else {
count--;
}
}, 1000);
});