[jQuery] Create array from checkbox id's

[jQuery] Create array from checkbox id's


I am trying to create an array using the .map() method made up of the
ids of checked checkbox's. I am then wanting to use alert, to alert
each id to the user one at a time.
$("#testLink").click(function() {
var array = $.map($("#text
input[@type='checkbox']:checked").attr("id"),
function() {
return this.id;
});
alert(array);
});
<input type="checkbox" class="itemCheckDelete" name="test1"
id="test1" />
<input type="checkbox" class="itemCheckDelete" name="test2"
id="test2" />
<input name="test3" type="checkbox" class="itemCheckDelete" id="test3"
checked="checked" />
<a href="#" id="testLink">Click</a>