call javascript function when checkbox is checked or unchecked vanilla js code example
Example: checked unchecked through js
document.getElementById("checkbox_id").checked;
//If checked returns true;
//else returns false;
document.getElementById("checkbox_id").checked;
//If checked returns true;
//else returns false;