Skip to content

Instantly share code, notes, and snippets.

@jentanbernardus
Created March 13, 2014 22:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jentanbernardus/9538925 to your computer and use it in GitHub Desktop.
Save jentanbernardus/9538925 to your computer and use it in GitHub Desktop.
JavaScript substitute email link - Fighting spam
$(function(){
// substitute email link
$('a.substitutedEmailLink').each(function(index, item){
var linkContent = $(this).html();
$(this).parent().html("<a href='mailto:"+despamitizeEAddress()+"'>"+linkContent+"</a>");
});
});
<div id="contact-us">
<a class="substitutedEmailLink">contact us</a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment