-
Notifications
You must be signed in to change notification settings - Fork 8
/
examples.html
35 lines (33 loc) · 1.09 KB
/
examples.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<html>
<head>
<title>jQuery auto-correct examples</title>
<script src="http://code.jquery.com/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="jquery.autocorrect.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
// Bind events when document is ready
$(document).ready(function()
{
// Attach auto-correct plugin with default options
$("#textbox1").autocorrect();
// Attach auto-correct plugin with new option alongwith option to over-write old one
$("#textbox2").autocorrect({
corrections: {
arent: "aren't",
aboutit: "about it"
}
});
// Attach auto-correct plugin to textarea
$("#textarea").autocorrect({ corrections: { aboutit: "about it" } });
});
//-->
</script>
</head>
<body>
<p>Type something like 'ur teh best', 'you arent listening', 'I am talking aboutit for a while' etc. and see the magic</p>
Textbox #1: <input id="textbox1" type="text" /><br />
Textbox #2: <input id="textbox2" type="text" /><br /><br />
Textarea<br />
<textarea cols="50" id="textarea" rows="10"></textarea>
</body>
</html>