This repository has been archived by the owner on May 30, 2024. It is now read-only.
How can I pass a custom step value to the slider? #376
Answered
by
andreruffert
graf-andreev
asked this question in
Q&A
-
Hello everyone. How can I pass a custom step value to the slider? For example, I need steps of 15, 30, 60, 90. This code doesn't work. $('input[type="range"]').rangeslider({ |
Beta Was this translation helpful? Give feedback.
Answered by
andreruffert
Oct 9, 2023
Replies: 1 comment
-
@graf-andreev based on the docs the Have a look at this codepen. It describes an approach of value mapping. In your case this would look something like this: <input type="range" min="0" max="3" step="1" value="0"> const valueMapping = [15, 30, 60, 90] ✌️ |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
andreruffert
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@graf-andreev based on the docs the
step
option is not supported that's why your described code above is not working.Have a look at this codepen.
It describes an approach of value mapping. In your case this would look something like this:
✌️