Wednesday, March 24, 2010

jQuery .queue() and .dequeue()

jQuery has some weird stuff to do with making smooth animations.

There are the following functions:
.queue()
.stop()
.dequeue()
.clearQueue()

The normal queue() is the "fx" queue, which you can use for chaining effects (and it is used by default in the background). Hopefully with this command I can add things to the "fx" queue that can take advantage of some of the other chained functions like .delay() without having to use the animations hack. Hurray. Also stop() is cool, because it's a essentially a "pause" button, though I don't know how to resume() =)