Vai al contenuto
Prenatalizia 2025
const text = “Un’esperienza inaspettata vi aspetta.”;
let i = 0;
function typing() {
if (i < text.length) {
document.getElementById("typing-text").innerHTML += text.charAt(i);
i++;
setTimeout(typing, 80);
}
}
typing();
const eventDate = new Date("Dec 3, 2025 19:00:00").getTime();
const timer = setInterval(function() {
const now = new Date().getTime();
const distance = eventDate – now;
if (distance < 0) {
document.getElementById("countdown").innerHTML = "Ci siamo!";
clearInterval(timer);
return;
}
const days = Math.floor(distance / (1000 * 60 * 60 * 24));
const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
document.getElementById("countdown").innerHTML = days + " giorni " + hours + "h " + minutes + "m";
}, 1000);