Return to Snippet

Revision: 38057
at December 23, 2010 15:23 by thefricky

Initial Code
$.each($('.email'), function(){
	var mail = $(this).text();
	mail = mail.replace('[at]','@');
	$(this).html('<a href="mailto:' + mail + '>' + mail + '</a>'); 

Initial URL

Initial Description
Instead of writing the link in the HTML, just write the email address inside any tag you want (p, spam, div...) with the class "email", and put "[at]" instead "@". This script replace the "[at]" and create the link outside the spam robot sight

Initial Title
Anti Spam email link

Initial Tags
email, link, jquery

Initial Language