Opened 7 years ago

Closed 7 years ago

Last modified 4 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

Change History (2)

comment:1 Changed 7 years ago by rdworth

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r3361

comment:2 Changed 4 years ago by scottgonzalez

  • Milestone changed from to 1.8a2
Note: See TracTickets for help on using tickets.