Share Posted January 21 Hello guys, I'm new to GSAP On my page I have I have a few sections I resize the height of the first section immediately after the page load using gsap.to The subsequent section have scroll triggers. However the start and end of each section is still based on the values before the resize of the initial element I believe I need to use ScrollTrigger.refresh() to recalculate, but I'm not sure where to put it, see my codepen example Any help would be appreciated... See the Pen mdjpxaX?editors=0111 by bruce-persaud (@bruce-persaud) on CodePen Link to comment Share on other sites More sharing options...
Solution Solution Share Posted January 21 Hi @BruceST! On your gsap.to that control your .one-one height, add this parameter: onComplete: () => { ScrollTrigger.refresh(); } See the Pen OJwzwmz by sam-tremblay (@sam-tremblay) on CodePen Happy Tweening! 3 Link to comment Share on other sites More sharing options...
Author Share Posted January 24 Thanks a lot 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