Capitalise the first letter of a string

 Javascript

String.prototype.capitalize = function() {
        return this.charAt(0).toUpperCase() + this.slice(1);
}

...

"hello world".capitalize();  =>  "Hello world" 

CSS

p:first-letter {
        text-transform:capitalize;
}

Jquery / CSS

$('#mystring_id').text(string).css('text-transform','capitalize');

http://stackoverflow.com/questions/1026069/capitalize-the-first-letter-of-string-in-javascript