[jQuery] Get this in ajax
I'm using a ajax function but wish to return $(this) inside the
success function but can't seem to get it to work, can some one tell
me if its possible. If you look inside the success function i'm trying
to get $(this) from the click function.
$('.del').live('click', function() {
var str = $(this).serialize() + '&js=true';
$.ajax({
url: $(this).attr('action'),
data: str,
beforeSend: function() {
},
success: function(data){
console.log($(this));
},
error: function(xhr, status, error) {
}
});
return false;
});
}
return false;
});