JSFiddle - React, Tailwind, and code Playground

HTML

<div class="circle"></div>
<div class="square"></div>

CSS

.circle {
    background: blue;
    width: 30px;
    height: 30px;
    border-radius: 30px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
}
.square {
    width: 200px;
    height: 200px;
    border: 1px solid red;
    position: absolute;
    top: 15px;
    left: 15px;
}

JavaScript

var animationLoop = function() {
  $('.circle').animate({
        left: 200
    }).animate({
        top: 2000
    }).animate({
        left: 0
    }).animate({
        top: 200
    });  
    animationLoop();
};

setInterval(animationLoop());