MENU
Queue And Others
.queue([String q]) .queue([String q], Array newQueue) .queue([String q], function(function dqNext()) f) Show or manipulate the queue of functions. .dequeue([String q]) Execute the next function on the queue. .delay(int msDuration [, String q]) Delay execution for subsequent items in the queue. .stop([String q][, Boolean clearQ][, Boolean toEnd]) Stop the current animation. .finish([String q]) Stop the current animation, remove all queued animations, and complete all animations. .clearQueue([String q]) Remove from the queue all items that have not been run.$.fx.off Setting this to true disables all animation. |
RESETRUNFULL
<!DOCTYPE html><html><head><script src="jquery-3.5.1.min.js"></script><style type="text/css">
div {background:cyan;
height:100px;width:100px;
border:2px solid;}
div:first-child {background:cyan;}
div:last-child {background:yellow;}</style><script> $(document).ready(function(){
alert($.fx.interval); // 13
var d = $("div");
setInterval( // fx is the default queue name
function(){$('p').text(d.queue('fx').length)},
100);
$.fx.interval = 1; // smoothing
$("button").click(function(){
d.delay(3000)
.animate({height:300,width:300,marginLeft:300},3000);
d.delay(3000)
.animate({width:100},3000); // this is dequeued
d.dequeue().dequeue();
d.delay(3000).animate({height:50},3000)
.delay(3000)
.animate({height:100,width:100,marginLeft:0},3000)
.slideUp(3000).fadeIn(3000);
});});</script> </head><body>
<p>Two moving boxes keep changing their shapes:</p>
<button>Start</button>
<div></div>
<div></div></body></html>