-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
61 lines (58 loc) · 2.04 KB
/
index.html
File metadata and controls
61 lines (58 loc) · 2.04 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<title>CricFuzz</title>
<style>
body{
background: #09a3fc;
background: linear-gradient(to right, rgb(233, 118, 98), rgb(238, 51, 255));
}
h1 {
display: block;
font-size: 5em;
margin-top: 0.67em;
margin-bottom: 0.67em;
margin-left: 0;
margin-right: 0;
font-weight: bold;
}
</style>
<script>
var settings = {
"async": true,
"crossDomain": true,
"url": " https://cricapi.com/api/cricketScore?apikey=sFUfGBnubFXQXbxv1KywJwebqUs2&unique_id=1175368",
"method": "GET"
}
$.ajax(settings).done(function (response) {
console.log(response);
var content = response;
$("#paragraph").append(content.score);
$("#paragraph2").append(content['team-1']);
$("#paragraph3").append(content['team-2']);
});
function reloadPage()
{
window.location.reload();
}
</script>
</head>
<body>
<center>
<div class="container">
<h1 class="text-primary">Cricket Scores</h1>
<br><br>
<p class="btn btn-success "id="paragraph">Status: </p><br><br>
<p id="paragraph2" class="btn btn-primary">Team 1: </p><br><br>
<h4 class="btn btn-danger"><span class="glyphicon glyphicon-info-sign"></span> VS.</h4><br><br>
<p id="paragraph3" class="btn btn-info">Team 2: </p><br><br>
<button type="submit" class="btn btn-basic" onclick="reloadPage()"><span class="glyphicon glyphicon-repeat"></span> Refresh Scores</button>
</div>
</center>
</body>
</html>