moody Posted April 10, 2023 Share Posted April 10, 2023 I’m trying to stop scrolling in a certain section of my page using GSAP ScrollTrigger. Specifically, I have a GTLF model that I want to display in a section called “section-four” and I need to disable scrolling while the model is visible. I’ve tried using endTrigger but it didn’t work. Can you suggest the best way to achieve this using GSAP ScrollTrigger? I’m sharing an example of my code below: See the Pen qBJdprL by MOODYWAA (@MOODYWAA) on CodePen Link to comment Share on other sites More sharing options...
Rodrigo Posted April 10, 2023 Share Posted April 10, 2023 Hi, What you can do is use the Observer Plugin in order to prevent ScrollTrigger to keep moving and somehow "lock" the scroll. In this thread it was discussed how that could be achieved: Here you can check the docs for the Observer Plugin: https://greensock.com/docs/v3/Plugins/Observer Hopefully this is enough to get you started. Let us know if you have more questions. Happy Tweening! 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