Prev Demo
jQuery
>
.Clearqueue() - Remove Unexecuted 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" value="Start" id="btnStart" /> <input type="button" value="Stop" id="btnStopp" /> <div id="divStarClearQueue" style="height: 50px; width: 50px; background: yellow; left: 0px; display: none; position: absolute;"> </div> <script> $("#btnStart").click(function () { $("#divStarClearQueue").show("slow"); //1st animation $("#divStarClearQueue").animate({ width: '+=200px' }, 500); // 2nd animation $("#divStarClearQueue").slideUp(); // 3rd animation }); $("#btnStopp").click(function () { $("#divStarClearQueue").clearQueue(); $("#divStarClearQueue").stop(); }); </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output