JSFiddle - React, Tailwind, and code Playground

HTML

<input type="checkbox" id="first" value="1" />1<br />
<input type="checkbox" id="second" value="2" />2<br />

<button id="auto">Auto Check 1</button>

JavaScript

$(document).ready(function() {
	$("#auto").click(function(){
		$('#first').prop('checked', true);
    });
    
    jQuery(':checkbox').on('change', function() {
		alert('checkbox has changed');
	});
});