Clou Posted October 8, 2023 Share Posted October 8, 2023 I have a design when click on image opens popup. Im struggling to disable scroll when popup opens and enable when pop up closes. When u scroll on open pop the smooth scroll pushes the modal up and down. Thank you See the Pen rNoQPzL by peva92 (@peva92) on CodePen Link to comment Share on other sites More sharing options...
GreenSock Posted October 8, 2023 Share Posted October 8, 2023 You can just use the paused() method of the ScrollSmoother: See the Pen dywwjLE?editors=0010 by GreenSock (@GreenSock) on CodePen Glancing at your JavaScript, it sure seems like you could greatly simplify a lot of that. Oh, and typically it's best to use xPercent: 30 rather than x: "30%", for example. GSAP has built-in conveniences for percentage-based values which can be COMBINED with normal transforms for powerful effects. I hope that helps. And thanks for being a Club GreenSock member. 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