-
Notifications
You must be signed in to change notification settings - Fork 0
/
autosuggest.html
31 lines (31 loc) · 1020 Bytes
/
autosuggest.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
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Test AutoSuggest</title>
<script src="//code.jquery.com/jquery-latest.js"></script>
<link rel="stylesheet" href="autoSuggestv14/autoSuggest.css" type="text/css" />
<script type="text/javascript" src="autoSuggestv14/jquery.autoSuggest.js"></script>
<script type="text/javascript">
$(function(){
var plain_data = ['aardvark', 'alphabet', 'foo', 'bar', 'alabama', 'freak', 'food', 'gorillas', 'bananas', 'catamount' ];
var data = [];
for(var i in plain_data){
data[i] = {value:plain_data[i]};
}
var as_options = {
startText: 'Tag…'
};
$("#type_tags").autoSuggest(data, as_options);
$('#data_echo').html(plain_data.join("\n<br />"));
});
</script>
</head>
<body>
<h1>Test AutoSuggest</h1>
<p>Using a <a href="http://code.drewwilson.com/entry/autosuggest-jquery-plugin">plugin by Drew Wilson</a></p>
<input type="text" id="type_tags" />
<h3>Data list</h3>
<p id="data_echo" style="-webkit-column-count: 3;"></p>
</body>
</html>