The task is to capitalize the first letter of string without using toUpperCase() method with the help of jQuery. There are two approaches that are discussed below:
Approach 1: In this example, the css() method is used to used to set the text-transform property value to capitalize.
Approach 2: In this example, we are using CSS property to perform the operation. A new ID has been added to the element which sets the property text-transform to capitalize.
- How to change Input characters to Upper Case while typing using CSS/jQuery ?
- How to convert list of elements in an array using jQuery ?
- How to Convert HTML Table into Excel Spreadsheet using jQuery ?
- How to check a string starts/ends with a specific string in jQuery ?
- How do you get the length of a string in JQuery?
- How to find sub-string between the two words using jQuery ?
- Convert minutes to hours/minutes with the help of JQuery
- How to serialize an object to query string using jQuery ?
- How to calculate the number of words in a string using JQuery?
- How to convert string to boolean in PHP?
- How to convert a string into number in PHP?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.