JSFiddle - React, Tailwind, and code Playground
HTML
<div id="buttons">
<a href=".content1">Div 1</a>
<a href=".content2">Div 2</a>
<a href=".content3">Div 3</a>
</div>
<div>
<div class="content1 togg">1111</div>
<div class="content2 togg">2222</div>
<div class="content3 togg">3333</div>
</div>
CSS
.content1 {display:none;}
.content2 {display:none;}
.content3 {display:none;}
JavaScript
$("#buttons a").click(function(e){
e.preventDefault();
var toShow = $(this).attr('href');
$(".togg").fadeOut();
$(toShow).fadeIn();
});