jQuery Removing All Spaces From String

jQuery Removing All Spaces From String

Today, We want to share with you jQuery Removing All Spaces From String.
In this post we will show you Removing All Spaces From a String Using jQuery, hear for javascript remove all white space from string we will give you demo and example for implement.
In this post, we will learn about How to Remove White Spaces from A String Using jQuery with an example.

jQuery – Remove ALL white spaces from text Example

Often we require to all the string trim means remove all the space as white space from given any special text or string.

->So at that time you can remove some spaces from Text using javascript function replace() of core php. as well as simple replace() will help to all the string replace your blank or white space as well as empty space or extra any space or trailing trim space from text or string that way we can delete/remove.

->you can do very Easy way, it from bellow Best example.

<html lang="en">
    <title>Jquery - Remove All white space from string Example - pakainfo.com</title>  
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>

<div class="mycontent">
  This   is  my    pakainfo      site.

<script type="text/javascript">
      var myText = $(".mycontent").text();
      var remove_space = myText.replace(/ /g,'');

We hope you get an idea about jquery remove white space from beginning and end of string
We would like to have feedback on my Information blog .
Your valuable any feedback, Good question, Inspirational Quotes, or Motivational comments about this article are always welcome.
If you liked this post, Please don’t forget to share this as Well as Like FaceBook Page.

We hope This Post can help you…….Good Luck!.