I need to timer one more time on my landing pages, but when I try to use one more time then just show the first one, the rest of the number of timers not show.
I have tried a lot of times, I don't know where is problem.
show me like this:
but I need like this one more time:
I have tried like this way:
js file:
// time start
var deadline = new Date("june 07, 2021, 07:49:25").getTime();
var x = setInterval(function () {
var currentTime = new Date().getTime();
var t = deadline - currentTime;
var days = Math.floor(t / (1000 * 60 * 60 * 24));
var hours = Math.floor((t % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((t % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((t % (1000 * 60)) / 1000);
document.getElementById("day").innerHTML = days;
document.getElementById("hour").innerHTML = hours;
document.getElementById("minute").innerHTML = minutes;
document.getElementById("second").innerHTML = seconds;
if (t < 1) {
clearInterval(x);
document.getElementById("time-up").innerHTML = "";
document.getElementById("day").innerHTML = "0";
document.getElementById("hour").innerHTML = "0";
document.getElementById("minute").innerHTML = "0";
document.getElementById("second").innerHTML = "0";
}
}, 1000);
// time end
css file:
/*time start*/
.timer {
font-family: sans-serif;
color: #fff;
display: inline-block;
font-weight: 100;
text-align: center;
font-size: 16px;
}
.timer div {
border-radius: 20px;
background: #000000f7;
display: inline-block;
font-family: Oswald;
font-size: 52px;
font-weight: 400;
width: 96px;
margin-right: 11px;
}
.timer .smalltext {
color: #ffffff;
font-size: 19px;
font-family: Poppins;
font-weight: 500;
display: block;
padding: 0;
width: auto;
margin-top: -11px;
}
.timer #time-up {
margin: 8px 0 0;
text-align: left;
font-size: 14px;
font-style: normal;
color: #000000;
font-weight: 500;
letter-spacing: 1px;
}
.delas {
display: inline-block;
font-size: 23px;
padding-right: 31px;
}
/*time end*/
Any suggestion Please...

