JSFiddle - React, Tailwind, and code Playground

HTML

<div style="left: 50px; display:none;"></div>

CSS

div {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #FF6600;
}

JavaScript

var $divs = $("div");
// Queue an animation on each div every 1s
setInterval(function() {
    $divs
        // Make sure previous animation has completed
        // and animation queue is empty first.
        .stop( true, true )
        // Fade the div out if it's visible and
        // fade it in if it's hidden.
        .fadeToggle(
            // Animation is 250ms long.
            250, "linear"
        );
}, 1000);