<html>
<head>
<script src="jquery-latest.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#btn1").click(function(){
$("div").animate({marginRight:"50px"});
});
$("#btn2").click(function(){
$("div").animate({marginRight:"5px"});
});
});
</script>
</head>
<body>
<button id="btn1">Animate Start</button>
<button id="btn2">Animate Stop</button><br>
<div id="divanimate" style="background: pink;float:right;margin-right:5px;height:100px;width:100px;" ></div>
</body>
</html>