You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
-
30@Simon It's not stated that the string is necessarily going to be output as part of a HTML document - CSS is only going to be of use if it is.Adam Hepton– Adam Hepton2012年01月18日 09:32:40 +00:00Commented Jan 18, 2012 at 9:32
-
10Adam, true, but I'd guess that over 95% of the Javascript out there is used with HTML & CSS. Unfortunately, the "capitalize" statement actually capitalizes every word, so you'd still need JS to capitalize only the first letter of the string.Simon E.– Simon E.2012年01月21日 04:24:39 +00:00Commented Jan 21, 2012 at 4:24
-
19Incorrect, Dinesh. He said the first character of the string.Simon E.– Simon E.2012年06月26日 00:02:22 +00:00Commented Jun 26, 2012 at 0:02
-
86This answer, despite having a ridiculous number of upvotes, is just wrong, as it will capitalize the first letter of every word. @Ryan, you'll earn a Disciplined badge if you delete it. Please do so.Dan Dascalescu– Dan Dascalescu2012年11月07日 06:06:50 +00:00Commented Nov 7, 2012 at 6:06
-
6It's now javascript: $('.capitalize').css('text-transform', 'capitalize')Ali Gangji– Ali Gangji2013年04月13日 08:58:39 +00:00Commented Apr 13, 2013 at 8:58
lang-js