Aqua777 Posted November 30, 2022 Share Posted November 30, 2022 Hello! I'm trying to do a snap page scroll with multiple sections. However the some pages need to be scrolled twice instead of once as intended. How can I fix it? Original demo (without snap-scrolling): See the Pen zYzjvpE by minhcodefactory (@minhcodefactory) on CodePen My demo: See the Pen wvXEPzp by aqua908 (@aqua908) on CodePen Link to comment Share on other sites More sharing options...
mvaneijgen Posted November 30, 2022 Share Posted November 30, 2022 Hi @Aqua777 welcome to the forum! It seems like you are looking for the Observer plugin instead of ScrollTrigger. With the Observer plugin you can watch for the scroll event and then do animations based on that. The ScrollTrigger plugin is more for if you want things to happen on scroll. See the docs https://greensock.com/docs/v3/Plugins/Observer Check out this animation from the docs, looks like it does exact what you want! Hope it helps and happy tweening! See the Pen XWzRraJ by GreenSock (@GreenSock) on CodePen 1 Link to comment Share on other sites More sharing options...
Solution Rodrigo Posted November 30, 2022 Solution Share Posted November 30, 2022 Hi, I think this demo could be a good starting point as well: See the Pen NWxNEwY by GreenSock (@GreenSock) on CodePen Happy Tweening! Link to comment Share on other sites More sharing options...
Aqua777 Posted December 1, 2022 Author Share Posted December 1, 2022 20 hours ago, Rodrigo said: Hi, I think this demo could be a good starting point as well: Happy Tweening! Thank you for this demo! Now it works how I wanted! See the Pen ZERjOmQ by aqua908 (@aqua908) on CodePen (open on seperate tab) 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