Ticket #4659 (closed feature: fixed)

Opened 5 years ago

Last modified 2 years ago

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:
Blocking: Blocked by:

Description

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

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

Change History

Changed 5 years ago by Jaza

comment:1 Changed 5 years ago by rdworth

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

Fixed in r3361

comment:2 Changed 2 years ago by scott.gonzalez

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