Jump to content
Search Community

Not able to create a Perfect Horizontal Scrolling using Draggable plugin

Mohit Pain test
Moderator Tag

Recommended Posts

I'm trying to create draggable horizontal scrolling using the GSAP Draggable Plugin. My code is working 90% fine, but I'm encountering a problem at the end. When I try to drag the "drag button" to the end of the viewport, it moves further than the .container. I want it to stop at the .container. Why is it crossing the width of the container?

 

and my for loop is also not woking! i'm trying to add a "marker" div inside the timeline using forloop.

 

please correct my all mistake.. i want my drag to be working till the width of the container not more that that.

See the Pen eYayVvV by Mohit-Mishra-the-styleful (@Mohit-Mishra-the-styleful) on CodePen

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