-
Notifications
You must be signed in to change notification settings - Fork 1
/
example.html
33 lines (28 loc) · 769 Bytes
/
example.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
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
<script src="spellcheckAutocomplete.js"></script>
<script type='text/javascript'>
$(document).ready(function(){
// atach the autocomplete to a textbox
$( "#fruits" ).spellcheckAutocomplete({
threshold: 0.9,
source: [ "Apples","Oranges","Pears"],
/*
// source with ids
source: [
{ id: 1,label : "Apples" },
{ id: 2, label: "Oranges" },
{ id: 3, label: "Pears" }
],
*/
});
});
</script>
</head>
<body>
Fruits: <input type='text' id='fruits'>
</body>
</html>