DCHP
DCHP

Reputation: 1131

Jquery ui slider

Hi i am looking to set the steps of a jquery ui slider to the following because when it increments every one step it takes ages and i end up with lots off lag.

0,6,12,24,48,96,200,2048,51200

i know you can set the step but i want to manually set it to the above value.

i have tried so many different options but still scratching my head on how to fix this?

you can see my example here.

http://jsbin.com/egacut/3/edit

any help please

Upvotes: 1

Views: 204

Answers (1)

Justin Ethier
Justin Ethier

Reputation: 134157

Instead of changing the values to the requested ones, you can keep using the same values of 0 through 8 and just map those values to the desired ones from your question.

For example:

$("#amount").val(sizes[ui.value]);

The full example is available here: http://jsbin.com/egacut/6

Does that help?

Upvotes: 1

Related Questions