-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreloader.js
40 lines (34 loc) · 1.24 KB
/
preloader.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
38
39
40
function checkWindowSize() {
alert("local");
// window.innerWidth > 992 && (document.body.classList.add("overflow-hidden"),
window.addEventListener("load", () => {
// setTimeout(() => {
// (document.querySelector(".loader_lottie-flicker").style.display = "none"),
document.querySelector(".loader_v1").style.display = "flex";
let e = document.getElementById("bgVideo1");
e.play();
// }, 2160);
// let e = document.getElementById("bgVideo1");
e.addEventListener("ended", () => {
setTimeout(() => {
document.querySelector(".loader_v1").style.display = "none";
// let e = document.querySelector(".loader");
// (e.style.position = "absolute"),
// (e.style.top = "0"),
// (e.style.right = "0"),
// (e.style.zIndex = "-1");
let t = document.querySelector(".loader_v2");
t.style.display = "flex";
let i = document.getElementById("bgVideo2");
i.play();
}, 6000);
// (i.loop = !0),
// setTimeout(() => {
// t.style.transform = "translateX(10%)";
// }, 1e3),
// document.body.classList.remove("overflow-hidden");
});
});
// );
}
checkWindowSize(), window.addEventListener("resize", checkWindowSize);