-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.php
39 lines (31 loc) · 867 Bytes
/
api.php
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
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
init()
function init(){
var url="https://api.covidindiatracker.com/state_data.json"
var datama=''
var datamu=''
var datapu=''
var datath=''
var datasa=''
$.get(url,function(data){
datama=`
${data[0].active}`
$('#data1').html(datama)
datamu=`
${data[0].districtData[1].confirmed}`
$('#data2').html(datamu)
datapu=`
${data[0].districtData[0].confirmed}`
$('#data3').html(datapu)
datath=`
${data[0].districtData[2].confirmed}`
$('#data4').html(datath)
datasa=`
${data[0].districtData[11].confirmed}`
$('#data5').html(datasa)
})
}
})
</script>