How To Set A Checkbox To Checked in jQuery
There are a few ways of setting a checkbox to checked. If you are using jQuery 1.6 and greater, then you should use:
jQuery(element).prop('checked', true);
Since the .prop method did not exist prior to 1.6, you should use:
jQuery(element).attr('checked', true);