JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" name="copyAddress" id="copyAddress" value="1" />
</br>
<input type="checkbox" name="copyAddress" id="copyAddress2" value="1" />
</br>
<input type="checkbox" name="STR+OBJEDEN500V" id="box-62" >
JavaScript
/* $('#copyAddress').change(function () {
this.checked
? alert ("Checked")
: alert ("Unchecked");
});
$('#copyAddress2').change(function () {
this.checked
? alert ("Checked2")
: alert ("Unchecked2");
}); */
$('input[type=checkbox]').change(function () {
this.checked
? alert (this.name)
: alert ("Unchecked62");
});