Protect Email Address In Source Code - jQuery mailIt

Protect Email Address In Source Code - jQuery mailIt

mailIt is a jQuery plugin to prevent spambots and email harvesters that have the ability to convert the obfuscated strings into REAL email addresses on the webpage.

1. Load the minified version of the mailIt jQuery plugin after loading jQuery.

<script src="" 
<script src="src/jquery.mailIt.min.js"></script>

2. Use obfuscated strings (dummy/at/dot characters) to encrypt your email addresses.

<span class="email">anEmailAddress[at]</span>
<span class="email">anotherEmailAddress[at]domain[dot]com</span>
<span class="email">yetAnother<del>-REMOVE-THIS-</del>EmailAddress[at]domain[dot]com</span>

3. Attach the function mailIt to the email addresses. That's it.

$(function () {

4. Customize the dummy/at/dot characters.

$(function () {
    dummy: '-REMOVE-THIS-',
    at: '\\[at\\]',
    dot: '\\[dot\\]'

This awesome jQuery plugin is developed by gar-cad. For more Advanced Usages, please check the demo page or visit the official website.

  • Publication date: 27.03.2019
  • Source