str = $.trim(str);This alone isn't reason enough to use jQuery in a project. Its pretty easy to write a trim using regular expressions.
Programming Tips - javsScript: trim (remove whitespace characters from the start and end)
Date: 2011feb14
Language: javaScript
Q. javsScript: trim (remove whitespace characters from the start and end)
a string that works in all browsers
A. Firefox has a trim() but IE doesn't so nice solution is to use trim()
in jQuery like this: