jQuery.trim()

jQuery.trim()

jQuery.trim( str )Returns: String

Description: Remove the whitespace from the beginning and end of a string.

The $.trim() function removes all newlines, spaces (including non-breaking spaces), and tab