-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdemo.html
54 lines (46 loc) · 1015 Bytes
/
demo.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!doctype html>
<html>
<head>
<title>0g-typeahead Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<link rel="stylesheet" href="0g-typeahead.css">
<style>
*, *:before, *:after {
box-sizing: border-box;
}
body {
font-family: arial;
text-align: center;
font-size: 22px;
padding-top: 5%;
}
input {
width: 300px;
padding: 8px;
font-size: 22px;
}
p {
padding-top : 20px;
padding-bottom: 20px;
}
</style>
<h1>0g-typeahead demo</h1>
<p>Start typing the name of a country into the input field. It will be
autocompleted.</p>
Country:
<input name=country type=text>
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script src="demo-data.js"></script>
<script src="0g-typeahead.js"></script>
<script>
$('input[name=country]').typeahead({source: keyPress});
function keyPress(query,process)
{
process(countries);
}
</script>
</body>
</html>