JSFiddle - React, Tailwind, and code Playground
HTML
<button id="run">Run</button>
<div></div>
<div id="mover"></div>
<div></div>
<script>
$("#run").click(function(){
$("div:animated").toggleClass("colored");
});
function animateIt() {
$("#mover").slideToggle("slow", animateIt);
}
animateIt();
</script>
CSS
#mover{
width:50px;
height:50px;
}
.colored{
background:green;
}