JSFiddle - React, Tailwind, and code Playground
HTML
<div>test div</div>
<input type='checkbox' name='test'/>
<div id='a'>test2 div</div>
<input type='checkbox' name='test2'/>
CSS
<
JavaScript
$(function(){
$('div').hide();
$('input[type=checkbox]').on('change',function(){
$(this).prev().toggle(false);
});
});