/ Published in: Other
Expand |
Embed | Plain Text
if ( $("span.mailme").length ) { // variables, which will be replaced var at = / AT /; var dot = / DOT /g; // function, which replaces pre-made class $('span.mailme').each(function () { var addr = $(this).text().replace(at, '@').replace(dot, '.'); $(this).after('<a href="mailto:' + addr + '">' + addr + '</a>'); $(this).remove(); }); }
You need to login to post a comment.
