JSFiddle - React, Tailwind, and code Playground
HTML
<button id="hide">hide</button>
<button id="show">show</button>
<div id="first" class="circle"></div>
<div class="circle"></div>
CSS
.circle {
display: inline-block;
width: 150px;
height: 150px;
border-radius: 50%;
background: red;
}
button {
font-size: 20px;
margin: 5px;
cursor: pointer;
}
JavaScript
$(function(){
$('#hide').click(function() {
$('#first').hide(1000);
});
$('#show').click(function() {
$('#first').show(1000);
});
});