JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox">
<input type="checkbox">
<input type="checkbox">
<input type="checkbox">
<input type="checkbox">
<button>do it</button>
JavaScript
$("input").change(function(){
alert("CHANGED");
});
$("button").click(function(){
$("input").prop('checked', true);
});