JSFiddle - React, Tailwind, and code Playground
by lollero
HTML
<button>Click</button>
<div></div>
CSS
div {
display: none;
background: #c2c2c2;
width: 20px;
height: 20px;
border-radius: 20px;
margin: 30px;
}
JavaScript
var active = 0;
$('button').on("click", function() {
active = !active ? 1 : 0,
sh = active ?'show' : 'hide';
$(this).next()[ sh ]( 900 );
});