JSFiddle - React, Tailwind, and code Playground
HTML
<div class="bar">
<a href="#" class="click">Click Me</a>
<div class="div shown">
<p>Hello</p>
</div>
</div>
CSS
a {
color: white;
text-align: center;
}
.bar {
height: 20px;
background: red;
}
.div {
background: silver;
padding: 10px;
display: none;
}
JavaScript
$(".click").on("click", function() {
$(".div").fadeToggle("slow");
});