-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
42 lines (38 loc) · 1.07 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
41
42
<html>
<head>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<div id="table">
<input type="search" placeholder="filter" />
<table border="0" cellpadding="0" cellspacing="0">
<thead></thead>
<tbody class="list">
</tbody>
</table>
</div>
<script src="list.min.js"></script>
<script src="table.js"></script>
<script>
window.onload = function() {
var data = [
{"id": 0, "n_spikes": 10, "group": "unsorted", "quality": 1.},
{"id": 1, "n_spikes": 20, "group": "unsorted", "quality": 0.9},
{"id": 2, "n_spikes": 30, "group": "good", "quality": 0.8},
{"id": 3, "n_spikes": 40, "group": "noise", "quality": 0.7},
];
for (let i = 4; i < 1000; i++) {
data.push({"id": i, "n_spikes": 5});
}
var options = {
valueNames: ["id", "n_spikes", "quality", "group"],
columns: ["id", "n_spikes", "quality", "group"],
};
window.myTable = new Table('table', options, data);
window.myTable.onEvent("select", function (ids) {
//console.log(ids);
});
}
</script>
</body>
</html>