-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
40 lines (40 loc) · 1.29 KB
/
index.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
<html>
<head>
<meta charset="utf-8">
<title>Browse Select</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-sm-6 col-md-offset-3">
<input type="text" name="categories" id="browseSelect" class="form-control" />
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script src="src/browse_select.js"></script>
<script>
var input, browse;
$(function(){
input = document.getElementById('browseSelect');
browse = new BrowseSelect(input, {
data: {
'Fashion and beauty': {
'Beauty': {
id: '1',
name: 'Beauty',
'Cosmetics': { id: '2', name: 'Cosmetics' }
}
},
'Food and drink': {
'Food': { id: '3', name: 'Food' }
}
}
});
});
</script>
</body>
</html>