JSFiddle - React, Tailwind, and code Playground

HTML

<div>
    <div>abc</div>
    <div>123</div>
    <div><input type="checkbox" name="test" /></div>
</div>

CSS

div.hideIt {
    display:none;
}

JavaScript

$("input:checkbox").change(function(e) {
// ^ This here tell to select an input element of type `checkbox` and then attach an event to it
    $(this).parent().toggleClass('hideIt'); 
    //^ Here provide show those classes which you want to toggle, giving multiple class does not toggle between them

});