jQuery checkbox event handling
$('#myform :checkbox').change(function() {
// this will contain a reference to the checkbox
if (this.checked) {
// the checkbox is now checked
} else {
// the checkbox is now no longer checked
}
});
Use the change event.
$('#myform :checkbox').change(function() {
// this represents the checkbox that was checked
// do something with it
});