JSFiddle - React, Tailwind, and code Playground
HTML
<div class="box expandResults">
Blah blah blah
</div>
<div class="filtertitle">
Selections......
<div class="show-hide-results">
(Stuff from another jQuery that is shown onClick)
</div>
</div>
CSS
.box
{
border: 1px solid #ccc;
}
.expandResults
{
color: #333;
font-weight: bold;
font-size: 15px;
}
.filtertitle
{
border: 1px solid #ccc;
color: #f0a;
margin-top: 10px;
}
.show-hide-results
{
display: none;
}
JavaScript
if($'.box expandResults')) {
$('.show-hide-results').css({'display' : 'block'});
} else {
$('.show-hide-results').css({'display' : 'none'});
};