David_Tangent Posted October 6, 2023 Posted October 6, 2023 Hey there everyone Newbie here looking for some help. We're building a site on 7.1 tand we want a lottie to animate on scroll. At the moment we can't get it to work at all. It doesn't start scrolling, and when 'autoplay' and 'loop' are removed from the code block the lottie disappears. Can anyone help tweak the code? This is what we have at the moment: In Code Block container <lottie-player id="firstLottie" autoplay src="https://lottie.host/34ce465b-cd91-4cc8-bc1a-b2ed33f9600f/OFCFTqFgzG.json" style="width:100%; height: auto;">"></lottie-player> Code injection in Header: <script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script> <script src="https://unpkg.com/@lottiefiles/lottie-interactivity@latest/dist/lottie-interactivity.min.js"></script> Code injection in footer: <script> LottieInteractivity.create({ player: "#firstLottie", mode:"scroll", container: "#block-yui_3_17_2_1_1696515827607_2322", actions: [ { visibility: [0, 1.0], type: 'seek', frames: [0, 150], }, ] }); </script> Any help would be very much appreciated!
tuanphan Posted October 9, 2023 Posted October 9, 2023 You have invalid symbol It should be " and " Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
David_Tangent Posted October 9, 2023 Author Posted October 9, 2023 Thanks so much for your advice. I have updated the header script to: <script src=&"x22;https://unpkg.com/@lottiefiles/lottie-interactivity@latest/dist/lottie-interactivity.min.js&"x22;></script> Unfortunately the animation is still not working on scroll. I'm not sure if I have not properly followed your advice, or if there is some other error. Are you able to advise on any further steps please? Many thanks!
tuanphan Posted October 12, 2023 Posted October 12, 2023 Your comment still miss " " symbol, try this <script src="https://unpkg.com/@lottiefiles/lottie-interactivity@latest/dist/lottie-interactivity.min.js"></script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Elsbth Posted November 3, 2023 Posted November 3, 2023 I'm having the same issue! I'm unable to get any Lottie animations working on scroll. My code currently reads as: Code Block container <lottie-player id="firstLottie" autoplay src="https://lottie.host/34ce465b-cd91-4cc8-bc1a-b2ed33f9600f/OFCFTqFgzG.json" style="width:100%; height: auto;">"></lottie-player> <lottie-player id="firstLottie" src="https://lottie.host/28c136cb-c77b-47fc-b467-134670c6f445/MBNi5RAJkP.json" style="width:100%; height: 100%;">"></lottie-player> Code injection in Header: <script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script> <script src="https://unpkg.com/@lottiefiles/lottie-interactivity@latest/dist/lottie-interactivity.min.js"></script> Code injection in Footer: <script> LottieInteractivity.create({ player: "#firstLottie", mode:"scroll", container: "#block-yui_3_17_2_1_1696515827607_2322", actions: [ { visibility: [0, 1.0], type: 'seek', frames: [90, 123], ] }); Does anyone have any thoughts or advice?
tuanphan Posted November 6, 2023 Posted November 6, 2023 On 11/3/2023 at 5:09 PM, Elsbth said: I'm having the same issue! I'm unable to get any Lottie animations working on scroll. My code currently reads as: Code Block container <lottie-player id="firstLottie" autoplay src="https://lottie.host/34ce465b-cd91-4cc8-bc1a-b2ed33f9600f/OFCFTqFgzG.json" style="width:100%; height: auto;">"></lottie-player> <lottie-player id="firstLottie" src="https://lottie.host/28c136cb-c77b-47fc-b467-134670c6f445/MBNi5RAJkP.json" style="width:100%; height: 100%;">"></lottie-player> Code injection in Header: <script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script> <script src="https://unpkg.com/@lottiefiles/lottie-interactivity@latest/dist/lottie-interactivity.min.js"></script> Code injection in Footer: <script> LottieInteractivity.create({ player: "#firstLottie", mode:"scroll", container: "#block-yui_3_17_2_1_1696515827607_2322", actions: [ { visibility: [0, 1.0], type: 'seek', frames: [90, 123], ] }); Does anyone have any thoughts or advice? Can you share link to page? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Elsbth Posted November 17, 2023 Posted November 17, 2023 Can do! https://megalodon-dahlia-4z7t.squarespace.com/ Password: $quar3sp4ce Thanks so much 😊
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment