forked from swiftype/autocomplete-search-example
-
Notifications
You must be signed in to change notification settings - Fork 1
/
results.html
45 lines (40 loc) · 1.46 KB
/
results.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
<!doctype html>
<html>
<head>
<title>Swiftype Search Results</title>
<!-- jQuery is required for Swiftype's plugins -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<!-- Files for autocomplete and search -->
<script src="jquery.swiftype.autocomplete.js"></script>
<script src="jquery.ba-hashchange.min.js"></script>
<script src="jquery.swiftype.search.js"></script>
<!-- Default styles for autocomplete dropdown -->
<link rel="stylesheet" type="text/css" href="autocomplete.css"/>
<!-- styles for the example itself -->
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
<div id="header-fixed">
<form id="search-form">
<!-- <input type="text" id="st-search-input">
<button type="submit">Search</button> -->
<a href="index.html" id="brain_geo_link">
<img id="st-search-input-icon" src="brain_geo_pto.png" />
</a>
<input class="search-input" id="st-search-input" type="text" placeholder="Search for anything"/>
</form>
</div>
<div id="st-results-container"></div>
<script>
// set up autocomplete
$("#st-search-input").swiftype({
engineKey: "T6stQ2m7sf88bS7x75Vk"
});
// set up search
$("#st-search-input").swiftypeSearch({
engineKey: "T6stQ2m7sf88bS7x75Vk",
resultContainingElement: "#st-results-container"
});
</script>
</body>
</html>