-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
44 lines (42 loc) · 1.05 KB
/
index.html
File metadata and controls
44 lines (42 loc) · 1.05 KB
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
<html>
<head>
<link rel="stylesheet" href="bower_components/clusterize/clusterize.css">
<script src="bower_components/clusterize/clusterize.min.js"></script>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
</head>
<body>
<div id="scrollArea" class="clusterize-scroll">
<div id="contentArea" class="clusterize-content">
<div class="clusterize-no-data">Loading data...</div>
</div>
</div>
</body>
<script type="text/javascript">
$(document).ready(function(){
$.ajax({
type:'GET',
url:'BX-Users.txt',
dataType:'text',
success:function(data){
processData(data);
}
})
});
function processData(data){
var allTextLines = data.split(/\r\n|\n/);
var headers = allTextLines[0].split(';');
var arrays = [];
for(var i=1; i<allTextLines.length; i++){
var datas = allTextLines[i].split(';');
if(datas.length == headers.length){
arrays.push("<div>"+datas[1]+"</div>");
}
}
var clusterize = new Clusterize({
rows: arrays,
scrollId: 'scrollArea',
contentId: 'contentArea'
});
}
</script>
</html>