Jump to content
Search Community

Sticky slider with snap scroll

happycoding21 test
Moderator Tag

Go to solution Solved by Rodrigo,

Recommended Posts

Hi Gsap community, I am new to gsap and I am trying to create a slider snap scroll just like  at the bottom but I can't seem to figure why my slider doesnt snap as it supposed to on scroll down. it seems to work okay when you scroll all the way down and start scrolling up.  here is a codepen of my code 

See the Pen ExJBazp by Mileristov (@Mileristov) on CodePen

Link to comment
Share on other sites

  • Solution

Hi @milecoder and welcome to the GSAP Forums!

 

That can be done with the Observer Plugin:

https://gsap.com/docs/v3/Plugins/Observer/

 

If you check that particular site, in that section they hide the custom scrollbar, if you hover on it you'll see the scrollbar again and you can actually scroll past that section without the swipe effect.

 

What can be used is a combination of ScrollTrigger and Observer as shown in this demo:

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

 

Hopefully this helps.

Happy Tweening!

  • Thanks 1
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.
×
×
  • Create New...