JSFiddle - React, Tailwind, and code Playground

HTML

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

JavaScript

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