-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex1.html
51 lines (47 loc) · 1.21 KB
/
index1.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
46
47
48
49
50
51
<html>
<head>
<script src="vendor/jquery/jquery-1.6.2.min.js"></script>
</head>
<body>
</body>
<script>
/*$(document).ready(function(e){
var arrData = [2008,2009,2010,2011,2012,2013,2014,2015,2016,2017];
var d1 = {
name:"IPL",
children:[]
}
arrData.forEach(function(year){
$.ajax({
url: "data/" + year + "-team.json",
dataType: 'json',
//async: false,
success: function(data) {
var objYear = {
name : data.tournamentId.name,
tournament : data.tournamentId,
children:[]
};
data.squads.forEach(function(team){
var objTeam = {
name : team.team.shortName,
team : team,
children:[]
}
team.players.forEach(function(pl){
var objPLayer = {
name : pl.shortName,
player : pl
}
objTeam.children.push(objPLayer);
});
objYear.children.push(objTeam);
});
d1.children.push(objYear);
console.log(JSON.stringify(d1));
}
});
});
});*/
</script>
</html>