var countDownDate = new Date("Jan 28, 2021 23:59:00").getTime(); var x = setInterval(function() { var now = new Date().getTime(); var distance = countDownDate - now; var days = Math.floor(distance / (1000 * 60 * 60 * 24)); var daysStr = "0" + days.toString(); var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); var hoursStr = "0" + hours.toString(); var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); var minutesStr = "0" + minutes.toString(); var seconds = Math.floor((distance % (1000 * 60)) / 1000); var secondsStr = "0" + seconds.toString(); if (distance < 0) { clearInterval(x); document.getElementsByClassName("shslider")[0].classList.add('d-lg-block'); document.getElementsByClassName("shslider")[0].classList.remove('d-lg-none'); document.getElementsByClassName("shlist-new")[0].classList.add('d-block'); document.getElementsByClassName("shlist-new")[0].classList.remove('d-none'); document.getElementsByClassName("shlist-old")[0].classList.add('d-none'); document.getElementsByClassName("shlist-old")[0].classList.remove('d-block'); } }, 1000);