JSFiddle - React, Tailwind, and code Playground
HTML
<ul>
<li onclick="toggleNextSibling()">test</li>
<div class="hide">
how are you, what are you doing
</div>
</ul>
<dl>
<dt>hello</dt>
<dd>
how are you
</dd>
</dl>
SCSS
.hide {
display: none;
}
dt{
background: grey;
padding:3px;
}
JavaScript
function toggleNextSibling(){
event.target.nextElementSibling.classList.toggle("hide");
}