JSFiddle - React, Tailwind, and code Playground
HTML
<div id="foo">
Click me
<div class="bar"></div>
</div>
CSS
#foo {
height: auto;
background: #333;
color: white;
}
.bar {
display: none;
height: 200px;
width: 30px;
background: #f00;
}
JavaScript
$(function() {
$("#foo").click(function() {
$(".bar").fadeToggle();
});
});