How to remove white spaces from a string using jQuery ?
In this article, we will see how to remove the white spaces from string using jQuery. To remove the white spaces, we will use trim() method. The trim() method is used to remove the white spaces from the beginning and end of a string. Syntax: jQuery.trim( str ) Parameter: This method accepts a single