Here's a preview of my problem - JSFiddle.
Basically, I want change event to be fired, when I change the input state programatically like this:
el.checked = true;
But the event is fired only when I directly click on the checkbox, which doesn't work for me.
EDIT: Some clarification: I'm already dispatching a change event when the button is clicked and it's working just fine. What the problem is, is that I have custom checkbox element and the native input is hidden. So when I click the custom checkbox - the change event is fired properly. But when I change the native checkbox state, the custom checkbox is not changing, because I have no way to detect that change...
What I need is some custom method that detects this checkbox change and tells me "here, your checkbox is changed".