linux1880 Posted June 12, 2010 Share Posted June 12, 2010 I have two input fields, where first letter of each should be in capital letter. How do i achieve it. for example if user input meg ryan, it should appear as (Meg Ryan) pls help thanks Link to comment https://forums.phpfreaks.com/topic/204589-how-to-capitalize-in-jquery/ Share on other sites More sharing options...
premiso Posted June 12, 2010 Share Posted June 12, 2010 Well, if the jQuery accesses the data via a php script, use ucwords. Or you can use this function: http://phpjs.org/functions/ucwords:569 and it should work. Link to comment https://forums.phpfreaks.com/topic/204589-how-to-capitalize-in-jquery/#findComment-1071206 Share on other sites More sharing options...
ignace Posted June 12, 2010 Share Posted June 12, 2010 I have two input fields, where first letter of each should be in capital letter. How do i achieve it. You don't need JS for that, apply a CSS class: text-transform: capitalize; Link to comment https://forums.phpfreaks.com/topic/204589-how-to-capitalize-in-jquery/#findComment-1071207 Share on other sites More sharing options...
linux1880 Posted June 12, 2010 Author Share Posted June 12, 2010 Thank you so much ignace Link to comment https://forums.phpfreaks.com/topic/204589-how-to-capitalize-in-jquery/#findComment-1071224 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.