/ Published in: jQuery
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
//email spam protection - Example Markup: <span class="email">name[at]domain[dot]com</span>
$('.email').each(function() {
var $email = $(this);
var address = $email.text()
.replace(/\s*\[at\]\s*/, '@')
.replace(/\s*\[dot\]\s*/g, '.');
$email.html('<a href="mailto:' + address + '">'+ address +'</a>');
});
Comments
 Subscribe to comments
                    Subscribe to comments
                
                