redfawx Posted July 14, 2020 Share Posted July 14, 2020 Hi GreenSock! I want to say I absolutely love working with ScrollTrigger. Right now I've noticed that on window resize the plugin will reallocate the start and end point of an animation. However, when using a framework that updates the DOM on the fly it does not trigger the re-calculation. For example I'm doing a parallax effect with my footer. When I navigate pages the framework changes all the material inside the body of the page. This does not seem to trigger the recalculation like a window resize would. Is there a way built in to ScrollTrigger that already solves this problem? Link to comment Share on other sites More sharing options...
ZachSaucier Posted July 14, 2020 Share Posted July 14, 2020 Hey redfawx. Can you please create a minimal demo of the issue for us to look at? It's pretty hard for us to help abstractly Link to comment Share on other sites More sharing options...
GreenSock Posted July 14, 2020 Share Posted July 14, 2020 Just for the record, the ScrollTrigger.refresh() method is what does all the recalculations of start/end values and you're welcome to call that when you need to force a refresh. Only call it when you really need to, though. 1 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