JSFiddle - React, Tailwind, and code Playground
by nathanlogan
HTML
<a href="#" class="toggle" id="clans">Show</a>
<div id="clansBlock" style="display:none;">
<p>some shit</p>
</div>
<a href="#" class="toggle" id="stats">Show</a>
<div id="statsBlock" style="display:none;">
<p>some more shit</p>
</div>
JavaScript
$('.toggle').click(function(e) {
var $this = $(this);
$this.text( $this.text() == 'Show' ? 'Hide' : 'Show' );
$('#'+$this.attr('id') + "Block").toggle();
});