JSFiddle - React, Tailwind, and code Playground
by wirey00
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($(this).is(':checked'));
});
});