-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdate.js
28 lines (28 loc) · 844 Bytes
/
date.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
document.querySelector(".hov1").addEventListener("click",showCalen1);
document.querySelector(".hov2").addEventListener("click",showCalen2);
let clkOnCheckin=0;
let clkOnCheckOut=0;
function showCalen1(){
clkOnCheckin++;
let calen1= document.querySelector(".calen1");
if(clkOnCheckin%2==1){
document.querySelector(".hov1").style="display:none";
calen1.style="display:block";
}
else{
calen1.style="display:none";
document.querySelector(".hov1").style="display:block";
}
}
function showCalen2(){
clkOnCheckOut++;
let calen2= document.querySelector(".calen2");
if(clkOnCheckOut%2==1){
document.querySelector(".hov2").style="display:none";
calen2.style="display:block";
}
else{
calen2.style="display:none";
document.querySelector(".hov2").style="display:block";
}
}