Javascript examples for jQuery Method and Property:animate
Execute complete function only once in jQuery animation
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.7.1.js"></script> <script type="text/javascript"> $(window).load(function(){//from w ww . ja va 2 s . c o m $.when($("p").delay(500).animate({ "font-size": "+=50" }, 1000)).done(function(){ console.log("done"); }); }); </script> </head> <body> <p>Lorem</p> <p>Lorem</p> </body> </html>