チェックボックスをまとめてチェックする
$('#check-all').on('change', function() {
$('input[name="foo"]').prop('checked', this.checked);
});
<input id="check-all" type="checkbox" /> Check All
<input type="checkbox" name="foo" /> Checkbox 1
<input type="checkbox" name="foo" /> Checkbox 2
<input type="checkbox" name="foo" /> Checkbox 3