JSFiddle - React, Tailwind, and code Playground

HTML

<div id="container">
    click the red square to toggle the green one
</div>
<div id="show">
    
</div>

CSS

#container{
    width: 300px;
    height: 300px;
    background-color: red;
}
#show{
    width: 100px;
    height: 100px;
    background-color: green;
    display: none;
}

JavaScript

$("#container").click(function(){
 $("#show").fadeIn().delay(400).fadeOut();
});