rvp Posted February 1, 2022 Share Posted February 1, 2022 Hey guys, Quick question regarding ScrollTrigger toggleActions. Am I wrong in thinking that in the codepen I've provided the animation is supposed to play in reverse when hitting the onLeave event? I am trying to achieve the following behavior: the text scrolls into view and it appears then disappears when we leave the scrollTrigger limits but I don't understand why it remains visible when we see 'Leaving' in the console. Your help would be much appreciated! See the Pen vYWLqJJ by RVP22 (@RVP22) on CodePen Link to comment Share on other sites More sharing options...
Solution OSUblake Posted February 1, 2022 Solution Share Posted February 1, 2022 Hi rvp, toggleActions don't work when you have scrub. 2 Link to comment Share on other sites More sharing options...
rvp Posted February 1, 2022 Author Share Posted February 1, 2022 Oh, good to know. Thanks @OSUblake Link to comment Share on other sites More sharing options...
mikel Posted February 1, 2022 Share Posted February 1, 2022 Just a side-by-side-example of scrub and toggleActions. See the Pen ZEaQgLB?editors=0010 by mikeK (@mikeK) on CodePen Happy toggling ... Mikel 3 Link to comment Share on other sites More sharing options...
rvp Posted February 1, 2022 Author Share Posted February 1, 2022 Thank you @mikel - much appreciated! 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