Skip to main content

Search and Top Navigation

#4659 closed feature (fixed)

Opened July 08, 2009 06:24AM UTC

Closed October 12, 2009 10:51AM UTC

Last modified October 03, 2012 03:43PM UTC

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)
Change History (2)

Changed October 12, 2009 10:51AM UTC by rdworth comment:1

resolution: → fixed
status: newclosed

Fixed in r3361

Changed October 03, 2012 03:43PM UTC by scottgonzalez comment:2

milestone: 1.next1.8a2