adriendenat
adriendenat

Reputation: 3475

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>

Upvotes: 5

Views: 95

Answers (1)

hexa heart
hexa heart

Reputation: 181

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/

Upvotes: 2

Related Questions