JSFiddle - React, Tailwind, and code Playground

HTML

<div id="a"></div>

CSS

#a{
    position:relative;
    width:100px;
    height:100px;
    
    border: 2px solid blue;
}

JavaScript

function a(){
    $("#a").animate({top :"10px"},100);
    setTimeout(a,1000);
}

setTimeout(a,1000);