Jump to content
GreenSock

jackkemm

Interpolate and range slider position using value from an input

Go to solution Solved by GreenSock,

Recommended Posts

Hi I'm hoping someone can help.

 

I have got this range slider working with the help of Blake on a previous post, but have one more thing to do before it's complete.

 

The range slider is using inerpolate and clamp and I am setting the initial values using the progress value with interpolate.

 

I am allowing the user to add in a value to a number input on the left, and am wanting the slider knob to adjust accordingly. Is there a way to translate that in to a progress value or pass the value directly?

 

Thanks in advance.

 

Jack

See the Pen YzVyVbb by jackkemm (@jackkemm) on CodePen

Link to comment
Share on other sites

Hi Jack,

 

Thanks for the guidance. Works like a charm!

 

I have one more question I am hoping I can ask here too.

 

I need to change direction for mobile to be on the x axis. Is it just a matter of killing the Draggable instance and re initialising it in the new direction?

 

Thanks,

 

Jack

Link to comment
Share on other sites

6 minutes ago, jackkemm said:

I need to change direction for mobile to be on the x axis. Is it just a matter of killing the Draggable instance and re initialising it in the new direction?

Sounds correct to me. :)

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