jquery check if checkbox is checked onchange code example
Example 1: oncheck event jquery
$(".checkbox").change(function() {
if(this.checked) {
//Do stuff
}
});
Example 2: checkbox change event javascript
document.getElementById('one').addEventListener('click', function(){
var two = document.getElementById('two');
two.checked = ! two.checked;
two.dispatchEvent('change');
});