Share Posted July 7, 2021 Is there a way to trigger an animation at exactly 2000px from the top of the page while making sure that if you go back to the top, the animation reverse? I guess I'm describing a timeline animation attached to the scroll with a trigger at 2000px from the top of body. I'm working on a Nextjs app so forwarding refs is not the ideal scenario. Link to comment Share on other sites More sharing options...
Share Posted July 7, 2021 1 hour ago, cdedreuille said: I'm working on a Nextjs app so forwarding refs is not the ideal scenario. You have to work within the parameters of the framework you're working with. Have you looked at the selector util? Added in version 3.7.0. See the Pen BaWOZpM by GreenSock (@GreenSock) on CodePen 1 hour ago, cdedreuille said: Is there a way to trigger an animation at exactly 2000px from the top of the page? So let's say top of body + 2000px. Sure, that's what ScrollTrigger is for. https://greensock.com/docs/v3/Plugins/ScrollTrigger 1 Link to comment Share on other sites More sharing options...
Author Share Posted July 8, 2021 Ah I didn't know about selector. This doesn't solved my issue but that's a good one to know. I think I need to refactor my animation differently. 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