×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Robert Taller
Added: Apr 12, 2017 11:26 AM
Modified: Apr 12, 2017 12:41 PM
Views: 7
  1. <span class="emlclk">
  2.     <a href="mailto: info@yourdomain.com">info@yourdomain.com</a>
  3. </span>
  4.  
  5. function replaceAt() {
  6.     $('.emlclk:contains("##at##")').each(function () {
  7.         var text = $(this).text();
  8.         var newtext = text.replace('##at##', '@');
  9.         $(this).html('<a href="mailto: ' + newtext + '">' + newtext + '</a>');
  10.     });
  11. }