Last updated on October 11, 2014
JQuery provides trim method it works like Javascript trim method, it will remove all the whitespace(tab,newline characters) characters from the beginning and end of the given string.Below is the simple example script.
NOTE:Trim function only removes spaces from starting and end of the string. If there are any space between middle of the statement that is ignored.
That’s it.