mlikaon Posted July 10, 2021 Share Posted July 10, 2021 Hi everyone ! I'm a beginner to GSAP and I wish I had know this masterpiece years ago (congrats to the team). I'm testing out the various plugins and I'm currently having a weird behaviour while using both TextPlugin and ScrollTrigger. My goal is to have a text that got typed when it's container heads up in the viewport (using ScrollTrigger) and keeps going until entire text is written. My ScrollTrigger seems to be working fine, but at the second I'm scrolling the text out of the view port, the animation stops (and I don't want this). Codepen instructions for testing : 1. Scroll to the text div, text starts to get animated. 2. Scroll down until text div goes out of viewport. 3. Scroll back to text div, it stucks a second or more and then updates the animation. I suppose this is a misusage of the libs, but as a beginner any insight is highly valuable for me. Thanks for your time ! See the Pen YzVGrqW by florian-trang (@florian-trang) on CodePen Link to comment Share on other sites More sharing options...
iDad5 Posted July 10, 2021 Share Posted July 10, 2021 You don't have to use toggle. Try onEnter 5 Link to comment Share on other sites More sharing options...
mlikaon Posted July 10, 2021 Author Share Posted July 10, 2021 Well that makes sense 😄 I used the basic example and didn't notice there was the onEnter event. Thanks for the tip, it's working as expected now ! 3 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now