<html>
<head>
<script src="../../ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
var div = $("div");
div.animate({height: 300}, "slow");
div.animate({width: 300}, "slow");
div.animate({height: 100}, "slow");
div.animate({width: 100}, "slow");
$("span").text(div.queue().length);
});
});
</script>
</head>
<body>
<button>Start Animation</button>
<p>The queue length is: <span></span></p>
<div style="width:50px;height:50px;position:absolute;left:10px;top:100px;background-color:red;"></div>
</body>
<!-- Mirrored from www.w3schools.com/jquery/tryit.asp?filename=tryjquery_eff_queue by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 05 Jun 2019 14:33:25 GMT -->
</html>