Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery Slider UI dynamic step size

I have a slider with the following properties:

  • an horizontal direction
  • one handle
  • a min of 2
  • a max of 65

My goal is to force the user to choose between only 7 points (for example: "2, 3, 4, 26, 39, 52, 65") and nothing more.

How do I create a dynamic step size or how do I allow only those points to be the slider steps?

like image 671
daykkin Avatar asked Sep 01 '11 08:09

daykkin


1 Answers

Why not use a slider with only 7 points, and convert your value with a table:

see my jsfiddle example http://jsfiddle.net/bouillard/Uy5sD/

like image 138
Benoît Avatar answered Sep 18 '22 22:09

Benoît