Join the Webstudio community

Home
Members
Ramvidal
R
Ramvidal
Offline, last seen 2 months ago
Joined December 13, 2024
H! i taked a cowntdown timer from templates and works well, but dont works if i replicate in the same page, can help me please to fix it?

<script>
//👇 Set the date we're counting down to
const countDownDate = new Date("Jan 13, 2026 21:00:00").getTime();
// 👆


// Update the count down every 1 second
const x = setInterval(function() {

// Get today's date and time
const now = new Date().getTime();

// Find the time left
const distance = countDownDate - now;

// Time calculations for days, hours, minutes and seconds
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));
const seconds = Math.floor((distance % (1000 * 60)) / 1000);

// Output the result in the elements with class="countdown-..."
document.querySelector('.countdown-day').innerHTML = days;
document.querySelector('.countdown-hr').innerHTML = hours;
document.querySelector('.countdown-min').innerHTML = minutes;
document.querySelector('.countdown-sec').innerHTML = seconds;
}, 1000);
</script>
7 comments
J
R
R
Ramvidal
·

ai builder

Hi! i have the top tier of ltd, and im trying to build something with the ai prompt but dont works
7 comments
O
R
J
How can i add the url to a pulsating button?
4 comments
s
S
J
R