Simple jQuery Plugin for antispam E-Mails. Feel free to use it or let me know your improvements.
The plugin parses your code for the classes and replace an attribute (or the tag itself) with the correct email address.
- if it's an a-tag the plugin adds the "mailto:"
-
Include jQuery:
<script src="/js/antimail.js"></script>
-
Call the plugin:
$("body").antimail({ domain: 'mydomain.com', // everything behind the @ email: 'email' // everything before the @, attribute: 'href' // param to orverride });
-
In your Code:
<a href="#" data-antimail-domain="yourdomain" data-antimail-email="yourname"> <span class="antimail" data-antimail-domain="yourdomain" data-antimail-email="yourname"> </span> </a>
Roland Kainbacher
2015-07-30 V 0.1 Release
based on https://github.com/jquery-boilerplate/boilerplate/
- add support for mailto subject
- add support for mailto body