Personally i feel that making the first letter of a word, in a sentence and sometimes the first letter of every word in a sentence, looks better than all lowercase. When it comes to input textfields and the loading of external content, i like to make the first letter capitalised, so i created a String method, which i use regularly and i thought i would share it...
Heres the code for the method:
| String.prototype.ucFirst=function()
{ if(arguments[0] == true) { var words=this.split(" ") for(var w in words) { words[w]=words[w].ucFirst() } return words.join(" ") } return this.charAt(0).toUpperCase()+this.substring(1,this.length) } |
And heres how you would use it:
| input_title="this is my title";
title=input_title.ucFirst(); input_name="guy watson"; name=input_name.ucFirst(true); |





