JavaScript - - By Sam Deering

jquery captialise text

Quick jQuery snippet to captialise text using a regex and the toUpperCase function.

$(this).val(txt.replace(/^(.)|s(.)/g, function($1)
{ 
    return $1.toUpperCase( ); 
}));
Sponsors