3

I have a jQuery UI slider here.

http://jsfiddle.net/DrR7s/7/

I have animate attribues value as "true". When I place my mouse pointer somewhere on the bar and click there, it is giving a slide visual effect. But if I drag the slider pointer to a different point, I am not getting the animated slide effect which I got in the other case. It looks like its jumping from one point to another. Is there any way I can have the slide effect here too ?

Below is my script:

 $(function(){

 $('#slider').slider({
 animate: true,
 step:1,
 min:0,
 max:5

});

});
halfer
  • 19,824
  • 17
  • 99
  • 186
Shyju
  • 214,206
  • 104
  • 411
  • 497

2 Answers2

5

You're using the "Snap to Increments" version of the slider. If you take of the min, max, step or just set your step to something like .1, you'll get smoother sliding. But if you want to snap to those increments, you can't get smooth dragging.

If you really wanted the smooth sliding and the forced incremental values, you could just round the numbers when you go to handle them.

AndyL
  • 1,615
  • 1
  • 13
  • 15
1

You need to raise your max number, if you put it to max:100, it has a smoother dragging. The max tells the slider how many points to place on the slider itself. So going from point 0 to point 1 is big jump.

Kyle Undefined
  • 776
  • 1
  • 6
  • 15