Posted By

fredaudet on 09/10/08


Tagged

email mootools protection


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

SpinZ
stephenns
l1r
satsuma
michellebracken


Email protection with mootools


 / Published in: HTML
 

  1. <span rel="david|davidwalsh.name" class="email custom-class">Email me!</span>
  2.  
  3.  
  4. window.addEvent('domready', function() {
  5. $each($$('.email'), function(el) {
  6. var anchor = new Element('a', {
  7. href: 'mailto:' + el.get('rel').replace('|','@'),
  8. 'class': el.get('class'),
  9. }).replaces(el);
  10. });
  11. });

Report this snippet  

You need to login to post a comment.