-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
37 lines (29 loc) · 1.02 KB
/
index.js
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
console.log(data)
const hours = document.getElementsByClassName('hrs');
const last = document.getElementsByClassName('last');
const daily_func = () =>{
for(let i=0;i<6; i++){
let head = document.getElementById(`content-${ i }`);
hours[i].innerHTML = `${ data[ i ].timeframes.daily.current }hrs`;
last[i].innerHTML = `Yesterday - ${ data[ i ].timeframes.daily.previous }hrs`;
}
animateCSS('.hrs','bounce');
//showContent();
}
const weekly_func = () =>{
for(let i=0;i<6; i++){
let head = document.getElementById(`content-${ i }`);
hours[i].innerHTML = `${ data[ i ].timeframes.weekly.current }hrs`;
last[i].innerHTML = `Last week - ${ data[ i ].timeframes.weekly.previous }hrs`;
}
//showContent();
animateCSS('.hrs','bounce');
}
const monthly_func = () =>{
for(let i=0;i<6; i++){
hours[i].innerHTML = `${ data[ i ].timeframes.monthly.current }hrs`;
last[i].innerHTML = `Last month - ${ data[ i ].timeframes.monthly.previous }hrs`;
}
//showContent();
animateCSS('.hrs','bounce');
}