Hi,
I have the following problem. I have a page with several links with
class "deletepm", and when I click on the links in a very quick
sequence, the following happens:
deleting 3
deleting 4
deleting 5
5 deleted
5 deleted
5 deleted
Here's the code:
$('a.deletepm').click(function(){
id = $(this).attr('id');
console.log('deleting '+id);
$.ajax({
type: "POST",
url: "ajax.php?action=deleteprivatemessage",
data: "id="+id,
success: function(response){
console.log('comment '+id+' deleted.');
}
});
return false;
});
For some reason, the ID inside the ajax callback doesn't get the right
values.. Any idea why this could be? Thanks in advance!