While moving house I decided it would be a smart idea to sell all my junk on eBay. I sold about 50 items. While packaging up stuff it AMAZED me how many people are lazy and don't capitalise their name, address or even their postcode. As it happens this is a massive pet peeve of mine.
So, as a result, this little plugin was born. Hopefully you'll never scream "You idiot, that's not how it's typed!" when going through data ever again.
Include jQuery and the plugin source in your <head> then instanciate the plugin on your element. The code you need, the available options and their defaults are shown below:
$( 'input.upper' ).yitihit(
'format' : 'title',
'event' : 'blur'
<input type="text" class="upper" />
There are only a few number of options available. Keep it simple my mum always said.
I reckon 'as you type' is bad user experience, but I included realtime correction anyway.
The editable option only applies when the blur event.
Download the latest version from Github
This plugin was born out of a pure rage and hatred of crappy data. As with all good rage, logic is flawed and not everything was
considered. There are a number of user experience things I dislike but haven't
bothered had time
to fix (like being unable to select the entire contents of the input with the keybaord).
That said, I want the stuff I create to be useful, if you can improve it in anyway fork away on GitHub and send me a pull request.