JSFiddle - React, Tailwind, and code Playground
HTML
<ul>
<li>
<input type="checkbox" id="first-check" name="first-check" /> first-check
</li>
<li>
<input type="checkbox" id="second-check" name="second-check" /> second-check
</li>
</ul>
<hr />
<p>Clicked: <span id="lblChanged">None</span>
JavaScript
$('input:checkbox[id]').change(function(event) {
var checkboxID = $(event.target).attr('id');
$('#lblChanged').text(checkboxID);
});