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('in');
//alert($(this).parent().prev().html());
var $checkbox = $(this).previous('li').find('input[type="checkbox"]');
console.log(!$checkbox.attr('checked'));
$checkbox.attr('checked', !$checkbox.attr('checked'));
});