JSFiddle - React, Tailwind, and code Playground

HTML

<div>
    <input type="checkbox" name="cb" value="xyz">XYZ <br>
    <p class='hello'> ;jfjkdnsfnkl</p>
</div>

CSS

.highlight1{
  display: none;
}

JavaScript

$(document).ready(function(){
    $("input[type='checkbox']").on('change', function(){
        if (this.checked)
            $(this).find('p').addClass('highlight1');
        
    });
    
  //  $("#check_all").on('click', function(){
   //     var item = $("input[type='checkbox']");
  //      item.prop('checked', !item.prop('checked')).change();
//});
});