-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
91 lines (82 loc) · 2 KB
/
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
let menuIcon = document.querySelector(".menubar");
let nav = document.querySelector(".rs");
let close = document.querySelector(".close_btn");
menuIcon.addEventListener("click", () => {
nav.classList.toggle("active");
});
// close.addEventListener("click", () => {
// nav.classList.remove("active");
// console.log("close", nav);
// });
// let menuIcon = document.querySelector(".menubar");
// let navlist = document.querySelector(".rs");
// menuIcon.addEventListener("click", () => {
// menuIcon.classList.toggle("active");
// // navlist.classList.toggle("active");
// document.body.classList.toggle("open");
// });
// remove navlist
// navlist.addEventListener("click", () => {
// navlist.classList.add("active");
// menuIcon.classList.remove("active");
// document.body.classList.remove("open");
// });
const scrollRevealOption = {
distance: "50px",
origin: "bottom",
duration: 1000,
};
// header container
ScrollReveal().reveal(".home_rs img", {
...scrollRevealOption,
});
ScrollReveal().reveal(".home_ls h1", {
...scrollRevealOption,
delay: 500,
});
ScrollReveal().reveal(".home_ls p", {
...scrollRevealOption,
delay: 1000,
});
ScrollReveal().reveal(".home_ls p", {
...scrollRevealOption,
delay: 1500,
});
ScrollReveal().reveal(".home_ls .btn_start", {
...scrollRevealOption,
delay: 2000,
});
ScrollReveal().reveal(".home_ls a", {
...scrollRevealOption,
delay: 2000,
});
// about container
ScrollReveal().reveal(".about_img img", {
...scrollRevealOption,
origin: "left",
});
ScrollReveal().reveal(".rs span", {
...scrollRevealOption,
delay: 500,
});
ScrollReveal().reveal(".rs h1", {
...scrollRevealOption,
delay: 1000,
});
ScrollReveal().reveal(".about__content p", {
...scrollRevealOption,
delay: 1500,
});
ScrollReveal().reveal(".client_detail ", {
...scrollRevealOption,
delay: 1500,
});
ScrollReveal().reveal(".client_rating", {
...scrollRevealOption,
delay: 2000,
});
// service container
ScrollReveal().reveal(".card", {
duration: 1000,
interval: 500,
});