Checkbox Handling in jQuery — a practical guide to jQuery checkbox with clear examples you can reuse in real projects.
jQuery Tutorial Series (60/101). Prefer one article? Read the complete jQuery tutorial.
Short description
Use .prop("checked") not .attr("checked") for current state.
Checkbox
$('#terms').prop('checked', true);
var skills = $('input[name="skills"]:checked').map(function () {
return $(this).val();
}).get();