JSFiddle - React, Tailwind, and code Playground
HTML
<button id="button1" class="category">Adventurer ▼</button>
<button id="button1" class="category">Something ▼</button>
<button id="button1" class="category">somethingnew ▼</button>
<div id="Adventurer" class="show">
<p>1. Climb a tree
<input type="checkbox" />
</p>
<p>2. Roll down a really big hill
<input type="checkbox">
</p>
<p>3. Camp out in the wild
<input type="checkbox">
</p>
<p>4. Build a den
<input type="checkbox">
</p>
<p>5. Skim a stone
<input type="checkbox">
</p>
</div>
<div id="Something" class="show">
<p>1. Something new
<input type="checkbox" />
</p>
<p>2. Roll down a something new
<input type="checkbox">
</p>
<p>3. Camp out something new
<input type="checkbox">
</p>
<p>4. Build something new
<input type="checkbox">
</p>
<p>5. Skim something new
<input type="checkbox">
</p>
</div>
<div id="somethingnew" class="show">
<p>1. Climb something
<input type="checkbox" />
</p>
<p>2. something
<input type="checkbox">
</p>
<p>3.something
<input type="checkbox">
</p>
<p>4. Build something
<input type="checkbox">
</p>
<p>5. Skim something
<input type="checkbox">
</p>
</div>
CSS
.show{
display:none;
}
JavaScript
$(document).ready(function () {
$(".category").click(function () {
$(".show").hide();
var divToShow = $(this).text().split(" ")[0];
$("#" + divToShow).toggle('slow');
});
});