Jump to content
Search Community

Draggable snap to fixed distance

Sumanta
Moderator Tag

Recommended Posts

Posted

I have created a draggable carousel. I want it to move exactly same distance equal to the width of the slides in the carousel - irrespective of the amount/ distance of the drag. In the attached codepen, the snap.x function calculates and returns the amount of drag on each drag. It looks like this callback is not getting triggered. Not sure what is going wrong.

See the Pen QWexWJy by sumanta-mukherjee (@sumanta-mukherjee) on CodePen.

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