Jump to content
Search Community

Horizontal Slider with Draggable

GSAPUser13_6 test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Hello! I am quite new to GSAP and I am trying to make a slider using Draggable. I am trying to display a caption when an item is above the arrow (the '\/'). I got working for the right side. However, I can't get the draggable to be able to drag all the way to the left without messing up getting the 'content-box' index in the OnDragEnd function. Please, let me know how to solve this. 

 

Thanks in advance :)

See the Pen zYXZzNo by CodePen13_6 (@CodePen13_6) on CodePen

Link to comment
Share on other sites

  • Solution

We don't typically provide custom solutions like this in these free forums, but I was curious about this and decided to clean up your demo for you: 

See the Pen GRLWvGp?editors=0010 by GreenSock (@GreenSock) on CodePen

 

I assume that was what you're looking for, right? You just had various logic issues and overcomplicated things a bit in my opinion. 🙂

 

I hope that helps!

  • Like 3
Link to comment
Share on other sites

10 hours ago, GreenSock said:

We don't typically provide custom solutions like this in these free forums, but I was curious about this and decided to clean up your demo for you: 

 

 

 

I assume that was what you're looking for, right? You just had various logic issues and overcomplicated things a bit in my opinion. 🙂

 

I hope that helps!

Thank you sir for doing it. You made my day. This is the exact thing, I was looking for.

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