jQuery auto-correct plugin

For times when a spell check is over kill! Many of us have over a period of time acquired some bad typing habits and we mis-spell some common word like typing 'teh' for 'the' and 'taht' instead of 'that'. Going back and correcting every instance of this mistake can be very frustrating - so rather than change habit here is a jQuery plugin which will auto-correct such mistakes as you type

Take a look at the Demo

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

Usage

Include plugin file in your page after the jQuery file

Configure your textboxes/textareas something like

CODE:
  1. $(document).ready(function()
  2. {
  3.     $("#textbox1").autocorrect();
  4.  
  5.     $("#textbox2").autocorrect({
  6.         corrections: {
  7.             arent: "aren't",
  8.             aboutit: "about it"
  9.         }
  10.     });
  11.  
  12.     $("#textarea").autocorrect({ corrections: { aboutit: "about it" } });
  13. });

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

Download : here


About this entry