-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the jEmailGenerator wiki!
jEmailGenerator works by using jQuery to help prevent crawlers indexing emails such as this:
<a href="mailto:[email protected]">[email protected]</a>
To use the plugin simply use:
$( selector ).jEmailGenerator();
on an element with these 3 data attributes: 'data-eName', 'data-eHost' and 'data-eDomain'
For example: <a href="#" data-eName="test" data-eHost="gmail" data-eDomain="com"></a>
Will output <a href="mailto:[email protected]" data-eName="test" data-eHost="gmail" data-eDomain="com">[email protected]</a>
after the page has loaded.
Currently, the plugin only accepts 2 arguments
- Text
- Redirect
The "Text" argument will change the text displayed inside of the element. If the value is left undefined the text will default to being the email address.
If the "Text" argument is set to false it will keep the text that is currently within the element.
The "Redirect" argument is a boolean which when set to true will redirect the user to the email link rather than actually adding the link to the href attribute.