Jump to content
Search Community

Please help to configurate scrolling bar with Inertia Plugin and Draggable Plugin

dmytro.kuz test
Moderator Tag

Recommended Posts

Hi guys. I'm trying to achieve something similar to this sample

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

But optimize it for my example.
I need to set the ability to scroll the scrollbar by dragging and after releasing it to move by inertia (something similar to scrolling on mobile devices). But a problem arises and my elements start to overlap each other so the behavior becomes incorrect. Maybe you can tell me what is wrong with my js code?

See the Pen XWoxvvd?editors=0011 by Dmytro-Kuz (@Dmytro-Kuz) on CodePen

Link to comment
Share on other sites

Hi,

 

I would strongly recommend you to get the Draggable/Inertia part working first and then add the ScrollTrigger part.

 

Here is a simple demo for using Draggable and Inertia with snap:

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

 

Finally take a look at this thread for ideas on how to combine Draggable with ScrollTrigger:

 

Hopefully this helps.

Happy Tweening!

  • Like 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...