Tryit Editor v1.8

Source Code:
<!DOCTYPE html> <html> <head> <script src="../../ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> </script> <script> $(document).ready(function() { $("#btn1").click(function(){ $("div").animate({height:"300px"}); $("div").animate({width:"600px"}); $("div").delay(1200).animate({height:"900px"}); }); }); </script> </head> <body> <p>This example demonstrates the animate() method with three merged boxes.</p> <p>The third box is set to delay() for 1200 milliseconds.</p> <div style="background:purple;height:100px;width:100px;margin:6px;"> </div> <p><button id="btn1">Animate</button></p> </body> </html>
Result:
W3Schools.com - Try it yourself