JSFiddle - React, Tailwind, and code Playground

HTML

<a href="#" class="one">One</a>
<a href="#" class="two">Two</a>
<a href="#" class="three">Three</a>
<a href="#" class="four">Four</a><br /><br />
<div id="one">One</div>
<div id="two">Two</div>
<div id="three">Three</div>
<div id="four">Four</div><br/><br/>

JavaScript

$("div").hide();
          // Show chosen div, and hide all others
        $("a").click(function (e) {
            //e.preventDefault();
            $("#" + $(this).attr("class")).fadeIn(1000).siblings('div').hide();
        });