Maximus Posted October 31, 2021 Share Posted October 31, 2021 Site URL: https://www.chaletvanblanc.com Hi all, HELP I had a working countdown timer on my site using the following code, and when I connected my domain (bought through square space) and upgraded my plan, the code stopped working... <center><h2 id="timer"></h2></center><script>var countDownDate = new Date("Nov 1, 2022 00:00: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 hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));var seconds = Math.floor((distance % (1000 * 60)) / 1000);document.getElementById("timer").innerHTML = days + "d " + hours + "h "+ minutes + "m " + seconds + "s ";if (distance < 0) {clearInterval(x);document.getElementById("timer").innerHTML = "and we're off!";} }, 1000); </script> Any ideas? Thanks in advance... Maximus Link to comment
Maximus Posted October 31, 2021 Author Share Posted October 31, 2021 Sorted, they just wanted more money... 🙂 Link to comment
Beyondspace Posted October 31, 2021 Share Posted October 31, 2021 9 minutes ago, Maximus said: Sorted, they just wanted more money... 🙂 Custom javascript code require business plan or higher BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment