Jump to content

britchiz

Member
  • Posts

    1
  • Joined

  • Last visited

britchiz's Achievements

Level 1

Level 1 (1/20)

0

Reputation

  1. Site URL: http://prwomeninbusiness.squarespace.com Hi! Thanks for taking the time to read. I'm trying to imbed a countdown timer widget into my page. I've followed all the instructions and read a lot of forums to see why I'm getting a script disabled code. I am a complete novice at this so go gentle with me :) Here's what I've tried based on other forums: -Logging out, viewing the page from an incognito tab -Disabling Ajax, that doesn't apply because Ajax isn't used with 7.1 versions of squarespace -Triple checking I've copied the code correctly I've attached screen shots of it while I'm in editing mode and when I'm in visitor mode. As you can see in visitor mode, it's like nothing even exists. Here is a copy of the code I'm using: <center><h2 id="timer"></h2></center><script>var countDownDate = new Date("Jun 16, 2021 19: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 = "Influential Women of the Year Awards - Live on Facebook!";} }, 1000); </script> What am I doing wrong?! How do I fix it?
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.