How to use ?

It's super simple.
you can use data attributes to make sure crawlers won't parse it easily, just like this
<a class="mail" href="" data-u="johndoe" data-d="domain" data-e="com" data-s="subject" data-b="body">Contact me!</a>

See how data attributes are used :

One last thing, if you don't put anything between the <a><a>, your email is printed by default.

Javascript / jQuery

Include in the bottom of your page jQuery and the plugin, for instance :

<script src="js/jquery.min.js"></script>
<script src="js/jquery.hideMyEmail.min.js"></script>
			
Then, the plugin itself : <script src="js/jquery.hideMyEmail.min.js"></script>

Finally, either put just after this or in another javascript file include and call the function on a jQuery selector :
$(document).ready(function(){ $('a.mail').hideMyEmail(); });
and voilà!

Download the plugin
jquery.hideMyEmail.min.js, only 438 o!

Demo

Check the source on this link, and try it : Contact me!

Otherwise, you can just go at this demo link

Contacts

Author: Alexandre Vasseur, freelance web developer
Contact :