Ensuring events are raised when you programatically set a property using jQuery

If you use jQuery to set a property or value of a element, don’t forget that that events such as onchange() etc. etc. aren’t automatically raised. You need to do that manually in your code using the $().trigger() method:

    $('#MyCheckbox').prop('checked', true).trigger('change');