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
-
$(document).ready(function()
-
{
-
$("#textbox1").autocorrect();
-
-
$("#textbox2").autocorrect({
-
corrections: {
-
arent: "aren't",
-
aboutit: "about it"
-
}
-
});
-
-
$("#textarea").autocorrect({ corrections: { aboutit: "about it" } });
-
});
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
You’re currently reading “ jQuery auto-correct plugin ,” an entry on SANIsoft – PHP for E Biz
- Published:
- 6.22.09 / 11:44am
- Category:
- Javascript, jQuery
- Author:
- Amit Badkas
2 Comments
Jump to comment form | comments rss | trackback uri