JSFiddle - React, Tailwind, and code Playground
by nsatija
HTML
<div>
<img class="userimage" src="http://placehold.it/200x200&text=image1" height="200" width="200" />
</div>
<input type="button" value="Click me to amimate" class="animationButton" />
<br><br><br><br><br><br><br><br>
<div class="addImg">
</div>
JavaScript
$(".animationButton").click(function(){
$(".userimage").animate({
left:$(".addImg").offset().left,
top:$(".addImg").offset().top,
},1000,function(){
$(".addImg").append("<img src='http://placehold.it/80x80&text=image1' />");
});
});