Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Complex slider incrementation

I'm trying to create a slider that increment this way:

slider

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>
like image 693
adriendenat Avatar asked Oct 31 '22 17:10

adriendenat


1 Answers

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/

like image 191
hexa heart Avatar answered Nov 08 '22 04:11

hexa heart