How to strip white space when grabbing text with jQuery
I'm wanting to use jQuery to wrap a mailto: anchor around an email address, but it's also grabbing the whitepace that the CMS is gen...
https://iskablogs.blogspot.com/2014/03/how-to-strip-white-space-when-grabbing.html
I'm wanting to use jQuery to wrap a mailto: anchor around an email address, but it's also grabbing the whitepace that the CMS is generating.
Here's the HTML I have to work with, the script as I have it and a copy of the output.
html
name@example.com
jQuery JavaScript
$(document).ready(function(){
$('div.field-field-email .field-item').each(function(){