JSFiddle - React, Tailwind, and code Playground

HTML

<div id="wrap">
<ul id="divtoggle">
    <li><a id="togglediv1" href="#">show div 1</a></li>
    <li><a id="togglediv2" href="#">show div 2</a></li>
    <li><a id="togglediv3" href="#">show div 3</a></li>
</ul>
<div id="div1">
    <p>This is the content inside the first container</p>
</div>
<div id="div2">
        <p>This is the content inside the second container</p>
</div>
<div id="div3">
        <p>This is the content inside the third container</p>
</div>
</div>

CSS

#div1, #div2, #div3 {
 display:none;   
}
.togglediv1 #div1, .togglediv2 #div2, .togglediv3 #div3{
 display:block;   
}

JavaScript

$("#divtoggle").delegate("a", "click", function(e) {
    var toggled = ($(this).prop("id"));
    $("div#wrap").prop("class", toggled);
});