I'm trying to create a slider that increment this way:
I first started doing a logarithmic slider but it actually didn't match the required labels. I can't figure out how to achieve this. Any ideas?
Complexity is that incrementation is changing during the slider progression: 5 -> 10, 10 -> 100, 500 -> 1000, etc.
Here is a demo slider you can play with: http://jsfiddle.net/jdefcswv/2/
Thank you!
(for some reason SO wants me to put some code in here so...)
<html></html>
I add a function Converter
. They use the slider value like a global progress and define between which steps the have to calculate the value.
You add step by addStep(progress, stepValue)
, progress
must be a positive value.
Currently the progress between two step are linear, but that's a good start ^^.
http://jsfiddle.net/jdefcswv/3/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With