Jump to content
GreenSock

Aitor

Move input range slider programmatically

Moderator Tag
Go to solution Solved by Carl,

Recommended Posts

How can I programmatically act on an input[type="range"]?

 

In the codePen can be seen that when you swipe manually the value is updated but when you swipe with the button the value is not updated.

 

Thank you!

See the Pen dywYrjp?editors=1111 by aitormendez (@aitormendez) on CodePen

Link to comment
Share on other sites

  • Aitor changed the title to Move input range slider programmatically
  • Solution

I would create a single animation that has an onUpdate function that is used to update the slider value and the displayed number

 

See the Pen qBLOwZR?editors=0011 by snorkltv (@snorkltv) on CodePen

 

 

 

 

  • Like 4
Link to comment
Share on other sites

Understood! Thank you very much. 🙏

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