Prev Demo
jQuery
>
.Dequeue() - Remove Executing Animation From 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="btnDequeue" value="Dequeue Demo" /> <div id="divDequeue" style="height: 50px; width: 50px; background: red; left: 0px; display: none; position: absolute;"> </div> <script> $("#btnDequeue").click(function () { $("#divDequeue").show("fast"); $("#divDequeue").fadeOut("slow"); $("#divDequeue").fadeIn("slow"); $("#divDequeue").queue(function () { $("#divDequeue").animate({ top: '+=200px' }, 2000); $(this).dequeue(); }); $("#divDequeue").animate({ left: '+200px' }, 2000); }); </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output