/ Published in: jQuery
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
Expand |
Embed | Plain Text
$.each($('.email'), function(){ var mail = $(this).text(); mail = mail.replace('[at]','@'); $(this).html('<a href="mailto:' + mail + '>' + mail + '</a>'); });
Comments
Subscribe to comments
You need to login to post a comment.

I'm not sure if this would work, pretty sure bots just use some sort of pattern matching on the entire page code looking for any email addresses listed.
Good point. In any case you can change "[at]" for any text you want and then replace it with the script.