jQuery
How To Convert Text String To Lower Case Using jQuery
When using jQuery, at times it would be helpful to know how to convert an existing string of text to lowercase i.e. make all characters lower case. In this article, I am going to share easy examples with demos that show you how to do so. Read on for more.
Make String Lower Case using jQuery
It is very easy to perform the string conversion to lower case. Let’s assume that we have a random string with different variations of text, i.e Upper case, Lower case and both.
Example: Converting all text of a string to lower case
<script type="text/javascript"> $(document).ready(function() { var str_original = 'This IS SOme randOM STRING.'; alert( str_original ); var converted_text = str_original.toLowerCase(); alert( converted_text ); }); </script>
Simple, isn’t it?
Do you know of any other ways to perform string conversion to lowercase using jQuery? Feel free to suggest by commenting below.