Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQuery countdown not working in IE.

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #34917
    Arvid
    Member

    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);
    });
Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.