I'm looking for an example of how to capitalize the first letter of a string being entered into a text field. Normally, this is done on the entire field with a function or regex onBlur or OnChange, etc... I want to capitalize the first letter while the user is STILL typing.
For instance, if I'm typing the word "cat" -- The user should press 'c', then by the time he presses 'a', the C should be capitalized in the field.
I think what I'm going for might be possible with keyup or keypress but I'm not sure where to start.
Anyone have an example for me?