JSFiddle - React, Tailwind, and code Playground

by Lal Prakash

HTML

<div id="container">
     <h2 id="header1">Section One</h2>

     <h2 id="header2">Section Two</h2>

</div>
<div id="section_one">This is Section One</div>
<div id="section_two">This is Section Two</div>

CSS

#container {
    overflow:hidden;
}
#container h2 {
    float:left;
    margin-right:30px;
    cursor:pointer;
}
#section_two {
    display:none;
}

JavaScript

$("#header1").click(function () {

    $("#section_one").show();
    $("#section_two").hide();
});
$("#header2").click(function () {

    $("#section_two").show();
    $("#section_one").hide();

});