Advertisement
all2aller

jQuery Mail Anti-spam

Jun 13th, 2014
504
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.41 KB | None | 0 0
  1. (function(jQuery) {
  2.     jQuery.fn.emailSpamProtection = function(className) {
  3.         return jQuery(this).find("." + className).each(function() {
  4.             var jQuerythis = jQuery(this);
  5.             var s = jQuerythis.text().replace(" [at] ", "@");
  6.             jQuerythis.html("<a href=\"mailto:" + s + "\">" + s + "</a>");
  7.         });
  8.     };
  9. })(jQuery);
  10.  
  11.   jQuery("body").emailSpamProtection("email");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement