JSFiddle - React, Tailwind, and code Playground
HTML
<div class="one">
</div>
CSS
.one {
position: relative;
height: 50px;
width:50px;
background-color: blue;
}
JavaScript
var counter = 0;
while (counter < 2) {
$(".one").animate({"left":"+=50px"}, "slow", function() {
counter++;
});
};