Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
proweb1991

dragable slider

Recommended Posts

hi

i need create a dragable area that draged between 3 labels (like attached file)

i want create a vertical dragable like codepen demo , but i have 2 problems, 

1- i can not limit dragable area (just  drag between blue area in codepen demo).

2- how can detect Which of these labels is selected to show  box 1 , 2 or 3 

thanks alot 

dragable.png

See the Pen NXbPQP by proweb1991 (@proweb1991) on CodePen

Link to post
Share on other sites

Here is the demo, you can add more conditions to determine what is closest number while dragging using onDrag, onThrowUpdate callback.

 

Also, how do you create your demos? I think I pointed out to you previously as well that you were using really old version of everything. Your current demo was using 1.17.0 which I guess is older than 2 years. Always make sure you are using latest files, easiest way is to google 'GSAP cdn' which will show you links from cdnjs to all non-club files. To get links to club files visit this pen https://codepen.io/GreenSock/pen/OPqpRJ Which still points older files by version or two but still better than using year old files.

 

See the Pen JMbdRZ?editors=0010 by Sahil89 (@Sahil89) on CodePen

 

  • Like 3
Link to post
Share on other sites

Hi Proweb, I don't understand your last post. The download button on the top of the Draggable page points to 1.20.3.

If you are getting old files from somewhere, please let us know the exact steps to follow, perhaps I'm missing something.

 

 

 

Link to post
Share on other sites

Na he copies links from those demos on that page.

Link to post
Share on other sites

Yes, unfortunately, I was wrong.
I've copied the file link from the demo
I'm sorry and thanks for your guidance ... 

Link to post
Share on other sites
15 minutes ago, proweb1991 said:

I'm sorry and thanks for your guidance ... 

 

You don't have to say sorry, it's alright. It will just give you unexpected results when you switch to latest version or some of the features won't work in old files, so best is to check which files you are using.

  • Like 3
Link to post
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.

×