I have a box that takes an input, then uses the scrollable's seekTo
method on keyup
to go to a particular slide. The problem is that if someone types quickly the scrollable gets a large queue and it takes a while for the animation to stop.
What I would like is on keyup
the previous animation stops (unless the input is empty) and the new animation starts. I've tried putting .stop()
in various places, but nothing seems to work.
Here is a fiddle of something similar to what I'm doing: http://jsfiddle.net/QaMZH/
Putting a number in the box (ex:1) then changing it to another number (ex: 2) will animate the scrollable to that slide number, but changing the numbers quickly queues a bunch of animations that can take a while to finish.