JSFiddle - React, Tailwind, and code Playground

HTML

<form id='violation_form'>
    <li>
        <input type='checkbox' />
        <label>Trisha, I love you</label>
    </li>
</form>

JavaScript

$('#violation_form label').click(function () {
    //alert($(this).parent().prev().html());
    var $checkbox = $(this).closest('li').find('input[type="checkbox"]');
    console.log(!$checkbox.prop('checked'));
    $checkbox.prop('checked', !$checkbox.prop('checked'));
});