I am trying to understand why the change event in the following example is not triggered (I\'ll show exactly where).
I have a checkbox, lets call it \'mainCheckbox
Onchange event is fired when the element loses focus. Since you are changing the value programmatically, the element you are changing never loses focus. You may wish to check the oninput event.
oninput