Here's the code:
this.Form.find("input[type=checkbox]").click(function(event) {
if ($(this).is(":checked")) {
console.log("checked");
}
else {
console.log("unchecked");
}
});
If the checkbox is not checked, and I click with the mouse, I get "checked". If I trigger it programmatically like $("#someCheckbox").click()
, I get "unchecked". How to make the two behave the same way?