Jump to content

Search In
  • More options...
Find results that contain...
Find results in...
Catalin R.

ScrollTrigger.scrollerProxy() on body tag

Recommended Posts


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?


See the Pen oNLqgBm by GreenSock (@GreenSock) on CodePen

Link to comment
Share on other sites


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

  • Like 5
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.