If you use jQuery, you’ve certainly came across the trim() function. It’s the quickest and painless way to remove the white space from the beginning and end of a string. However as much as jQuery tries to cover cross-browser compatibility, there’s just this little that always gets missed out on.
Here’s an example of the jQuery trim function:
And that’s all. Get coding and as usual, should you need any further information feel more than welcome to use the comments section below or contact us directly at email@example.com