JSFiddle - React, Tailwind, and code Playground
HTML
<div id="chk0">
<input type="checkbox" value="Fish" name="food" id="food">Fish</input>
<input type="checkbox" value="Chicken" name="food" id="food">Chicken</input>
</div >
JavaScript
var chks = $('#chk0 :checkbox[id="food"]');
alert( chks.length );
chks.each( function(index, v) {
this.checked = true;
});