$(document).ready(function () { $("#myButton").click(function () { $("#targetDiv").animate({ opacity: 0.4, marginLeft: "0.6in", fontSize: "3em", borderWidth: "10px" }, 1500); }); });
<html> <head> <title>animate</title> </head> <body> <div id="targetDiv"></div><br> <input type="button" id="myButton" value="Animate"> <input type="button" id="reset" Value="Reset" onclick="location.reload()" /> </body> </html>
#targetDiv { height:100px; width:100px; background-color:orange; }