Jump to content

Code block - Adding javascript

Recommended Posts

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
  • Replies 1
  • Views 676
  • Created
  • Last Reply
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  ↘️

About me: I'm Paul, a SQSP user for over 18 yrs and a Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL, providing high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji below. Buying a coffee is optional.

Book paid help with domains: Connect a GoDaddy domain. Connect a Squarespace Domain. Domain assistance

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.