Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Code block - Adding javascript


YngveB

Question

Site URL: https://lume.energy

Hi!

I I have tried to add a lottie file via script/JSON to my Squarespace page. However when I try to add code/JS to a block and choose Javascript something wierd happens. I cannot in any way shape or form get SS to show the actual file or run the script. Iv tried support but they dont help and refer me to forum:(. Please if anyone has done this and knows what to do please help. Iv added it in the way they recommend

Editor

https://d.pr/free/i/OpNNK0

 

Example on page > https://d.pr/free/i/TQjQRO

<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
<lottie-player src="https://lumebackground.s3.eu-north-1.amazonaws.com/Animation.json"  background="transparent"  speed="1"  style="width: 300px; height: 300px;"  loop controls autoplay></lottie-player>

 

Appreciate all help I can get. Thanks

Link to comment
  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

1 answer to this question

Recommended Posts

  • 0
2 hours ago, YngveB said:

I have tried to add a lottie file via script/JSON to my Squarespace page. However when I...choose Javascript something weird happens.

The code you have posted in your question isn't JavaScript, it is HTML. If you choose HTML you shouldn't see errors.

   If a post helps you, please click a "Like" option below  ↘️

sf-digital-signature-logo-email145.png.46606a2288a2847f44d81b9b7b58f3a5.png
Hi! I'm Paul, an independent Squarespace Consultant since 2007 and founder of SF Digital, building the features that Squarespace didn't include. Our mini-extensions allow you to pick dates in any format, show prices in other currencies, take orders without payment or improve your cartI value honesty, integrity, transparency and respect . Links in my posts may refer to SF Digital products or may be affiliate links.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...