Why do I always get the last id when I do an alert..The first values are overridden by the last id of content close

Why do I always get the last id when I do an alert..The first values are overridden by the last id of content close

$(document).ready(function(){
$('.content .part').hide();
var id='l';
var count=0;
$('.content .close').each(function(){
   var iden = id + count;
   $('.content .close').attr('id',iden);
   alert($('.content .close').attr('id'));
   count++;
});
$('.content .close').click(function(){
alert($(this).find('h3').html());
alert($('.content .close').attr('id'));     //I am always getting the last id "l3"
});

});