<html> <head><title>moving objects using animate</title> </head> <body> <button id="animate">Animate</button> <br /> <div id="box"> </div> </body> </html>
$(document).ready(function () { $("#animate").click(function () { $("#box").animate({ "width": "200px" }, "slow"); $("#box").animate({ "height": "200px" },{"queue":false, "duration":"slow"}); }); });
#box { background-color:Orange; height:100px; width:100px; margin-left:40px; margin-top:40px; }