jquery remove whitespace from string code example
Example 1: trim space in jquery
var str = " Hello World! ";
alert(str.trim());
Example 2: $(this).text() in jquery return white space
var emailAdd = $.trim($(this).text());
var str = " Hello World! ";
alert(str.trim());
var emailAdd = $.trim($(this).text());