remove white spaces from a string in jQuery
In this post we will give you information about remove white spaces from a string in jQuery. Hear we will give you detail about remove white spaces from a string in jQueryAnd how to use it also give you demo for it if it is necessary.
Use the jQuery $.trim() function
You can use the jQuery $.trim() function to remove all the spaces (including non-breaking spaces), newlines, and tabs from the beginning and end of the specified string.
However, the whitespaces in the middle of the string are preserved. The following example will show you how to remove leading and trailing whitespaces from a string of text.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Remove White Space from Strings</title>
<script src="https://.jquery.com/jquery-1.12.4.min.js"></script>
<script>
$(document).ready(function(){
var myStr = $(".original").text();
var trimStr = $.trim(myStr);
$(".trimmed").html(trimStr);
});
</script>
</head>
<body>
<h3>Original String</h3>
<pre > Paragraph of text with multiple white spaces before and after. </pre>
<br>
<h3>Trimmed String</h3>
<pre ></pre>
</body>
</html>
Hope this and post will helped you for implement remove white spaces from a string in jQuery. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and Keep reading our blogs
PHP Laravel 5: Class 'MongoDBDriverManager' not found
In this post we will give you information about PHP Laravel 5: Class 'MongoDBDriverManager' not found. Hear we will give you detail about PHP Laravel 5: Class 'MongoDBDriverManager' not foundAnd how to use it also give you demo for it if it is necessary.
In this post, you will find the solution for issue :.
FatalThrowableError in Client.php line 81: Class 'MongoDBDriverManager' not found
When you are going to connect MongoDB database with any PHP application then you can face this issue if you don't have PHP MongoDB driver.
So first you need to run following command to install Mongodb PHP extension in Ubuntu :
sudo apt-get install php-mongodb
Now restart the server :
sudo service apache2 restart
Try this..
Hope this code and post will helped you for implement PHP Laravel 5: Class 'MongoDBDriverManager' not found. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs
