-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
39 lines (37 loc) · 1.42 KB
/
script.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
const cross_l = document.getElementById("cross_l");
const cross_none = document.getElementById("cross_none");
const cross_r = document.getElementById("cross_r");
const nav = document.getElementById("fsm");
const cross = document.getElementById("hamburger");
const lefttext = document.querySelectorAll(".l");
const righttext = document.querySelectorAll(".r");
cross.addEventListener("click", () => {
cross.classList.toggle("active");
cross_l.classList.toggle("active_l");
cross_r.classList.toggle("active_r");
cross_none.classList.toggle("active_none");
nav.classList.toggle("active_nav");
lefttext.forEach((element) => {
element.classList.toggle("text_l");
});
righttext.forEach((element) => {
element.classList.toggle("text_r");
});
});
document.querySelectorAll(".projectContent").forEach((element) => {
element.addEventListener("mouseenter", () => {
element.classList.toggle("projectContent-active");
});
element.addEventListener("mouseleave", () => {
element.classList.toggle("projectContent-active");
});
});
// document.querySelectorAll(".blog_outer").forEach((element) => {
// console.log(document.querySelectorAll(".blog_outer"));
// element.addEventListener("mouseenter", () => {
// element.classList.toggle("blog-active");
// });
// element.addEventListener("mouseleave", () => {
// element.classList.toggle("blog-active");
// });
// });