Skip to content

Collection clearqueue

maxkfranz edited this page Mar 8, 2012 · 1 revision

eles.clearQueue()

Remove all queued animations for the elements in the collection.

eles.clearQueue()

Empties the animation queues of all elements in the collection

Details

This function clears the animation queue of each element in the collection. Calling eles.clearQueue() stops all queued animation not currently running from running in the future by removing them from the animation queue.

Examples

cy.nodes()
  .animate({ bypass: { fillColor: "red" } }) // animate to red
  .animate({ bypass: { fillColor: "bue" } }) // queue animate to blue
  .clearQueue(); // animate to blue is in the queue, and so it's removed

Clone this wiki locally