-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
24 lines (22 loc) · 852 Bytes
/
main.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
// cover sistem
const btn = document.getElementsByClassName("btn")[0];
const containerCover = document.getElementsByClassName("container-cover")[0];
const errorDisplay = document.getElementsByClassName("error")[0];
const containerDisplay = document.getElementsByClassName("container")[0];
const isi = document.getElementsByClassName("isi")[0];
btn.addEventListener("click", () => {
isi.style.display = "block";
containerCover.style.transform = "translateY(-700px)";
containerCover.style.opacity = "0";
containerCover.style.transition = "1s";
setTimeout(() => {
containerCover.style.display = "none";
containerCover.style.transform = "translateY(0)";
}, 1000);
});
let wdth = window.innerWidth;
if (wdth <= 600) {
errorDisplay.style.display = "none";
} else {
containerDisplay.style.display = "none";
}