seantrant
10/21/2016 - 3:39 PM

Countdown timer - use on span/div with id = count

Countdown timer - use on span/div with id = count

window.onload = function(){
  (function(){
    var counter = 20;
    setInterval(function() {
      counter--;
      if (counter >= 0) {
        span = document.getElementById("count");
        span.innerHTML = counter;
      }
      // Display 'counter' wherever you want to display it.
      if (counter === 0) {
          $(".slide_timer").text("");
          clearInterval(counter);
      }
    }, 1000);
  })();
}