Check a checkbox via jQuery
jQuery 1.6+
Use the new .prop() function:
$(".myCheckbox").prop("checked", true);$(".myCheckbox").prop("checked", false);
jQuery 1.5 and below
The .prop() function is not available, so you need to use .attr().
To check the checkbox (by setting the value of the checked attribute) do
$('.myCheckbox').attr('checked','checked')
and for un-checking (by removing the attribute entirely) do
$('.myCheckbox').removeAttr('checked')
