jQuery auto-correct plugin

Details

The plugin to auto-correct words in textboxes or textareas as per given configuration like 'teh' to 'the', 'taht' => 'that', 'ur' => 'you are' etc.

Works with jQuery-1.3.2 on all latest versions of major browsers like Firefox, Seamonkey, Chrome, IE, Safari, Opera etc.

Configuration

Include plugin file (generally in 'head' tag), something like <script src="jquery.autocorrect-1.0.js" type="text/javascript"></script>

Configure your textboxes/textareas something like

            <script type="text/javascript">
            $(document).ready(function()
            {
                $("#textbox1").autocorrect();

                $("#textbox2").autocorrect({
                    corrections: {
                        arent: "aren't",
                        aboutit: "about it"
                    }
                });

                $("#textarea").autocorrect({ corrections: { aboutit: "about it" } });
            });
            </script>
        
As you see, first textbox has auto-correct attached with no options, second with 'arent' (which already exists in default options but you can over-write it) and 'aboutit' (this is new one which does not exist in default corrections) then third one is textarea

Examples

Type something like 'ur teh best', 'you arent listening', 'I am talking aboutit ' etc. and see the magic

Textbox #1:
Textbox #2:

Textarea