JSFiddle - React, Tailwind, and code Playground
HTML
<label>
<input type="checkbox" class="pharmacy" checked /> Toggle paragraph
</label>
<p class="pcsoc">
Lorem ipsum dolor sit amet, consectetur adipiscing </p>
<input type="checkbox" class="toggler"/> Toggle views <br>
<p id="" onClick="clicked()"><input type="checkbox" class="box" id="" onClick="clicked()">Hello1</p><br>
<p id=""><input type="checkbox" class="box" id="" onClick="clicked()">Hello2</p> <br>
<p id=""><input type="checkbox" class="box" id="" onClick="clicked()">Hello3</p> <br>
<p id=""><input type="checkbox" class="box" id="" onClick="clicked()"> Hello4</p><br>
JavaScript
$('.pharmacy').change(function(){
if ($(this).is(':checked'))
$('.pcsoc').show();
else
$('.pcsoc').hide();
});
$('.toggler').change(function(){
if($(this).is(':checked'))
$('#active').hide();
else
$('#active').show();
};
function clicked(){
this.id="active";
//turn this.id;
}