See my demo code and adapt:
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("#checkAll").click(function(){
alert(this.id);
$('input:checkbox').not(this).prop('checked', this.checked);
});
});
</script>
</style>
</head>
<body>
<div id="checkboxes">
<input id="chkbx_0" type="checkbox" />Option 1
<input id="chkbx_1" type="checkbox" />Option 2
<input id="chkbx_2" type="checkbox" />Option 3
<input id="chkbx_3" type="checkbox" />Option 4
</div>
<br><br>
<input id="checkAll" type="checkbox" />Check All
</body>
</html>
This is to answer your follow-up query. It means 'excluding this', and what is 'this'? I have included a new line of alert code above, run it to find out the answer. In this case, it is ok to remove the 'not(this)'. And there are usually more than one way to write a program to meet a requirement.