SyntaxFix
Write A Post
Hire A Developer
Questions
I would do :
$('#checkbox').on("change", function (e){ if(this.checked){ // Do one thing } else{ // Do some other thing } });
See : https://www.w3schools.com/jsref/prop_checkbox_checked.asp