Answer the question
In order to leave comments, you need to log in
Countdown for goods?
var dateTimeForProd = [];
$('.project-manager p.time').each(function(e) {
var time = new Date($(this).attr('data-time')).getTime();
dateTimeForProd.push(time);
});
const timer = (date) => {
let now = Date.now();
let distance = date - now;
let days = Math.floor(distance / (1000 * 60 * 60 * 24));
let hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
let minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
let seconds = Math.floor((distance % (1000 * 60)) / 1000);
if (distance < 0) {
clearInterval(x);
}
}
let x = setInterval(function () {
for(var i = 0; i < dateTimeForProd.lenght; i++) {
}
}, 1000);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question