JQuery Example
Screen shot
jQuery Animation Decrease Height width then right then bottom left and top

<html>
<head>
<script src="jquery-3.2.1.min.js"/></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("div").animate({height: '100px'});
$("div").animate({width: '100px'});
$("div").animate({right: '400px'});
$("div").animate({top: '500px'});
$("div").animate({left: '0px'});
$("div").animate({top: '50px'});
});
});
</script>
</head>
<body>
<button>Start Here</button>
<div style="background:#FF6600;height:300px;width:300px;position:absolute;"></div>
</body>
</html>

You can download source code here