diff options
| author | 2018-03-21 21:21:28 +0000 | |
|---|---|---|
| committer | 2018-03-21 21:21:28 +0000 | |
| commit | b9de2dfadea298b78bf675462687bc38b08aa5a0 (patch) | |
| tree | 178bf7feca2b6627f826de6c7446585c2158fd87 /static | |
| parent | Pushing the footer to the bottom of the page (diff) | |
Countdown
Diffstat (limited to 'static')
| -rw-r--r-- | static/js/countdown.js | 10 | 
1 files changed, 2 insertions, 8 deletions
diff --git a/static/js/countdown.js b/static/js/countdown.js index 5f5871d9..53553fb7 100644 --- a/static/js/countdown.js +++ b/static/js/countdown.js @@ -1,8 +1,4 @@  var heading = document.getElementById("countdown-title"); -var daysDisplay = document.getElementById("days"); -var hoursDisplay = document.getElementById("hours"); -var minutesDisplay = document.getElementById("minutes"); -var secondsDisplay = document.getElementById("seconds");  var startjam = new Date(Date.UTC(2018, 2, 23));  var endjam = new Date(Date.UTC(2018, 2, 26));  var goal; @@ -42,9 +38,7 @@ if (now+1000 >= endjam.getTime()) {          if (seconds < 10) {              seconds = "0"+seconds;          } -        daysDisplay.innerHTML = days; -        hoursDisplay.innerHTML = hours; -        minutesDisplay.innerHTML = minutes; -        secondsDisplay.innerHTML = seconds; +        let formatted = `${days}:${hours}:${minutes}:${seconds}` +        document.getElementById('remaining').innerHTML = formatted;      }, 100);  }  |