Posted By

wza on 04/25/12


Tagged

textmate jquery+mask+email+spam


Versions (?)

jquery+mask+email


 / Published in: Other
 

  1. if ( $("span.mailme").length ) {
  2. // variables, which will be replaced
  3. var at = / AT /;
  4. var dot = / DOT /g;
  5.  
  6. // function, which replaces pre-made class
  7. $('span.mailme').each(function () {
  8. var addr = $(this).text().replace(at, '@').replace(dot, '.');
  9. $(this).after('<a href="mailto:' + addr + '">' + addr + '</a>');
  10. $(this).remove();
  11. });
  12. }

Report this snippet  

You need to login to post a comment.