I'm using the popular Firefox extension Greasemonkey.
I'd like to know if there was a way to capitalize all text inputs in a certain form, so if I would use jQuery the code would look something like:
$('form#formid input[type=text]').capitalize();
Now of course I know .capitalize()
is not a valid function, and in order to capitalize text you'd need a complicated JavaScript code, but after all the Googling, I could not find one that seemed like it could be implemented into Greasemonkey.
Can anybody help me to write this script?
By capitalize, I mean capitalizing the first letter of each word, like the CSS text-transform:capitalize;
and it must override the letters the user might put in, maybe doing it on form submit would be easier...
Thanks.