I have a table of recent web guest who have registered. One of the columns is a simple "send email" link that I hi-jack with Jquery when it's clicked and fire off an ajax .load to a backend php script that emails the person.
What I can't figure out, is how to simply change the link that was clicked on to something like "Sent!" and it's no longer a link.
The code is:
$(".sendEmail").click(function(){
var element = $(this);
var guest_id = element.attr("id");
$.post("WebGuest_SendEmail.php",{id: guest_id}, function(data) {
$(this).html(data); //NOT SURE WHAT TO DO HERE ON SUCCESS.
});
return false;
});