Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Saraf

GSAP ScrollTrigger pinning and smooth scroll together

Recommended Posts

Hello devs , i'm trying to implement smooth scroll and scrollTrigger pinning on same view port. As the smooth scroll works by disabling scroll and translating -Y , pinned div also translates instead of pinning.

Reference

Can anyone give me a solution , would be helpful. Thanks in advance.

See the Pen LQNZgv by wooooosky (@wooooosky) on CodePen

Link to post
Share on other sites

Hm, that CodePen uses a SUPER old version of GSAP...and it definitely doesn't use ScrollTrigger :)

 

ScrollTrigger intentionally doesn't do scroll-jacking, but you can use its scrollerProxy() to integrate with almost any smooth scrolling library. See https://greensock.com/docs/v3/Plugins/ScrollTrigger/static.scrollerProxy()

 

Enjoy!

  • Like 1
Link to post
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.

×