-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
39 lines (30 loc) · 1.19 KB
/
Copy pathscript.js
File metadata and controls
39 lines (30 loc) · 1.19 KB
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
document.addEventListener('DOMContentLoaded', () => {
const connectSection = document.querySelector('.connect');
const contentReveal = document.querySelector('.content--reveal');
const closeButton = document.querySelector('.content__close');
const menuItems = document.querySelectorAll('.menu__item');
menuItems.forEach(item => {
item.addEventListener('click', () => {
contentReveal.classList.add('active');
connectSection.style.display = 'none';
});
});
closeButton.addEventListener('click', () => {
contentReveal.classList.remove('active');
// Delay showing the connect section (e.g., 800ms)
setTimeout(() => {
connectSection.style.display = 'flex'; // or 'block' depending on layout
}, 500); // 800 milliseconds delay
});
});
const menuItems = document.querySelectorAll('.menu__item');
const header = document.getElementById('header-content');
const contentContainer = document.querySelector('.content--reveal');
menuItems.forEach(item => {
item.addEventListener('click', () => {
header.classList.add('fade-out');
});
});
document.querySelector('.content__close').addEventListener('click', () => {
header.classList.remove('fade-out');
});