-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
26 lines (23 loc) · 863 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
25
26
const navColumn = document.querySelector('.nav-column');
const navLinks = document.querySelector('.nav-links');
navColumn.addEventListener('click', () => {
navLinks.classList.toggle('active');
const menuText = document.getElementsByClassName("material-symbols-outlined")[0];
if (menuText.innerText === "menu") {
menuText.innerText = "close";
} else {
menuText.innerText = "menu";
}
});
// const observer = new IntersectionObserver((entries) => {
// entries.forEach((entry) => {
// console.log(entry)
// if (entry.isIntersecting) {
// entry.target.classList.add('show');
// } else {
// entry.target.classList.remove('show');
// }
// })
// })
// const hiddenElements = document.querySelectorAll('.hidden');
// hiddenElements.forEach((el) => observer.observe(el))