How to add scroll interactivity to Lottie Element?
I've been trying to add the capability for the lottie element to interact when scrolling through the page. I am aware that the lottie element on Brizy doesn't have that option as it stands so I decided to try coding it however I get an error when attempting to embed the animation.
I've been trying to follow this video: https://www.youtube.com/watch?v=IqgQ6NA-ojA&t=1098s
As soon as I embed the first lottie animation using the embed element, it does not display in editing mode nor in preview mode. Also, when I try to update the page with this code in the embed element..
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
<lottie-player src="https://assets2.lottiefiles.com/packages/lf20_c4udnllp.json" background="transparent" speed="1" style="width: 300px; height: 300px;" ></lottie-player>
I get the error "This page needs a refresh. You’ve probably updated this page (or another page) in a different tab or browser."
How can I go about getting the animation to play with a scrolling effect?
-
Hi,
Thank you for contacting us.
We have checked this code and everything is working well in our dashboard. If you get an error when you introduce this code then probably you have a firewall on the server that thinks that someone is trying to do xss attack.
Best regards, Nelea.
0
Please sign in to leave a comment.
Comments
1 comment