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

Code block - Adding javascript

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

Share this post


Link to post

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, founder of SF Digital, a specialist company building the features that Squarespace didn't include.
Explore our range of Squarespace Extensions, including the Wishlist, Variant Availability and Datepicker Extension
Note that links in my posts may be affiliate links. Need personal help? 
Book a Squarespace Expert.

Share this post


Link to post

Create an account or sign in to comment

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


×
×
  • Create New...