-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
30 lines (27 loc) · 893 Bytes
/
test.html
File metadata and controls
30 lines (27 loc) · 893 Bytes
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
<!doctype html>
<html>
<head>
<link href="asearch.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="asearch.js"></script>
</head>
<body>
<p>Search1:
<input type="search">
</p>
<p>Search2:
<input type="search">
</p>
<script>
var red_dot = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAIAAAA7ljmRAAAAGElEQVQIW2P4DwcMDAxAfBvMAhEQMYgcACEHG8ELxtbPAAAAAElFTkSuQmCC';
var test_data = [
{title:"test product #1",price:1230,url:"#1", thumbnail:red_dot},
{title:"test product #2",price:1231, compare_price:1240,url:"#2", thumbnail:red_dot}
];
$('input[type="search"]').aSearch(test_data)
.on('selected',function(e,item){
console.log("selected:",item);
});
</script>
</body>
</html>