You can get the target of the event using event.target.
$('input:checkbox[id]').change(function(event) {
var checkboxID = $(event.target).attr('id');
alert(checkboxID);
});
JSfiddle Demo
You can get the target of the event using event.target.
$('input:checkbox[id]').change(function(event) {
var checkboxID = $(event.target).attr('id');
alert(checkboxID);
});
JSfiddle Demo