JSFiddle - React, Tailwind, and code Playground
HTML
<a id="show" class="toggle">Show</a>
<br/>
<a id="hide" class="toggle">Hide</a>
<br />
<span class="content">
<span class="subContent">
Sample Text
</span>
</span>
CSS
.content {
display: none;
}
.subContent {
float:left;
width: 50%;
}
JavaScript
$(".toggle").bind("click", function() {
var method = $(this).attr("id");
$(".content")[ method ](0);
});