Jquery checkbox event
<p>This code is a JavaScript/jQuery code snippet. It attaches an event listener to all <code><input></code> elements of type "checkbox" within the <code><body></code> of an HTML document. When any of these …
1 2 3 4 | $('body').on('change', 'input[type="checkbox"]', function(e) {
$(this).prop("checked", this.checked);
$(this).val(this.checked);
});
|