Share Posted October 8, 2021 Hello, Is it possible to apply ScrollTrigger.scrollerProxy() on body tag? I've tried to use this: with body tag as a selector for scroller, and it didn't work. Is there any example? Thanks! See the Pen oNLqgBm by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
Share Posted October 8, 2021 Here you go @Catalin R. What is important, is to make sure that you still specifically set the body as the scroller and the pinType to "transform" - I did it here via ScrollTrigger.defaults(). Just as a little sidenote: You are actually applying a third-party smooth-scrolling library to work on the body - and then hooking up ScrollTrigger to that smooth-scroll via the .scrollerProxy(). See the Pen 16d802e8f90b1795ca1b86e2da67232a by akapowl (@akapowl) on CodePen 5 Link to comment Share on other sites More sharing options...
Author Share Posted October 8, 2021 Thanks, @akapowl! 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