Tag: trim jquery

Remove Whitespace from String using JQuery

JQuery provides trim method We can use the jQuery $.trim() function to remove all spaces (including non-breaking spaces), newlines, and tabs from the beginning and end of the specified string. However the whitespaces occurs in the middle of the string are preserved. The trim() method does not change the original string. Trim function only removes spaces from starting and end of the string. If there are any space between middle Read more…