JSFiddle - React, Tailwind, and code Playground
by Nick Craver
HTML
<input type="checkbox" name="sameAsShipping" class="checkbox" id="checkbox4"}>
<div id="checkout-shipping-address">
CLICK THE CHECKBOX TO HIDE ME!
</div>
CSS
.show-hide
{
display:none;
margin: 0;
padding: 0;
clear:both;
}
JavaScript
$(function(){
$("#checkbox4").change(function() {
$("#checkout-shipping-address").toggleClass("show-hide", this.checked)
}).change();
})