Prev Demo
jQuery
>
.Queue() - Get Length Of Animation Queue
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> </head> <body> <input type="button" id="btnQueue" value="Queue" /> <div id="divQueue" style="height: 50px; width: 50px; background: brown; left: 0px; position: absolute; display: none;"> </div> <script> $("#btnQueue").click(function () { QueueIt(); var n = $("#divQueue").queue("fx"); alert(n.length); }); function QueueIt() { $("#divQueue").show("slow"); // 1st animation $("#divQueue").slideUp("slow"); // 2nd animation $("#divQueue").slideDown("slow"); // 3rd animation $("#divQueue").hide("fast", QueueIt); // 4th animation } </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output