Opened 14 years ago

Closed 13 years ago

Last modified 10 years ago

#4659 closed feature (fixed)

Allow slider to animate if slider value is set programatically

Reported by: Jaza Owned by:
Priority: major Milestone: 1.8a2
Component: ui.slider Version: 1.7.2
Keywords: api, options, moreflexible Cc:
Blocked by: Blocking:


I'm creating a custom jQuery script that relies heavily on ui.slider, and that frequently sets the slider value programatically. Whenever I call $(el).slider('value', x), the slider handle simply jumps to its new position, and this doesn't look very nice. I'd much prefer if when I set a new slider value, the handle were to slide elegantly.

Attached patch adds a new 'animate_if_programmed' option to ui.slider. This achieves my purpose nicely. Doesn't change the default behaviour in any way, just allows animation on value change if you configure it to be so.

This is my first patch submitted to jQuery (coming from Drupal land), so please let me know if I haven't properly followed procedures. :P

Attachments (1)

slider_animate_if_programmed.patch (499 bytes) - added by Jaza 14 years ago.

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by Jaza

comment:1 Changed 13 years ago by rdworth

Resolution: fixed
Status: newclosed

Fixed in r3361

comment:2 Changed 10 years ago by Scott González

Milestone: 1.next1.8a2
Note: See TracTickets for help on using tickets.