JSFiddle - React, Tailwind, and code Playground
HTML
Click a button to make it visible:<br /><br />
<input type="button" value="One" class="one" />
<input type="button" value="Two" class="two" />
<input type="button" value="Three" class="three" />
<input type="button" value="Four" class="four" /><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
// Optional code to hide all divs
$("div").hide();
// Show chosen div, and hide all others
$("input").click(function ()
{
$("#" + $(this).attr("class")).show().siblings('div').hide();
});