bstnhnsl Posted September 5, 2022 Share Posted September 5, 2022 I'm using Scrolltrigger to animate some elements on my page when entering or leaving the viewport. I have a few places where I need to call ScrollTrigger.refresh() because content is removed from and added to the DOM. I dont want elements to animate again if they are already in the viewport. How can I achieve that? See the demo: Scroll down to trigger the headline animation. The Headline animates again if the button is clicked See the Pen poVvVyM by bstnjns (@bstnjns) on CodePen Link to comment Share on other sites More sharing options...
Solution GreenSock Posted September 5, 2022 Solution Share Posted September 5, 2022 Sorry about that, @bstnhnsl - I believe that was a regression in 3.11.1. It should be resolved in the next release which you can preview at https://assets.codepen.io/16327/ScrollTrigger.min.js (you may need to clear your cache) Better? Link to comment Share on other sites More sharing options...
bstnhnsl Posted September 23, 2022 Author Share Posted September 23, 2022 I was on 3.11.0, updating to 3.11.1 fixed the problem. Thanks for the help ❤️ 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