generated from microverseinc/readme-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathabout.js
21 lines (19 loc) · 751 Bytes
/
about.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const menuNavMobile = document.querySelector('.menu-nav-mobile');
const menuBar = document.querySelector('.menu-nav-mobile #menu');
const advertPage = document.querySelector('.advert-page');
const body = document.querySelector('body');
menuBar.addEventListener('click', () => {
menuNavMobile.classList.toggle('show');
body.classList.toggle('show');
advertPage.classList.toggle('show');
menuBar.classList.toggle('show');
});
const mobileLinks = document.querySelectorAll('.mobile-link a');
Array.from(mobileLinks).forEach((link) => {
link.addEventListener('click', () => {
menuNavMobile.classList.remove('show');
body.classList.remove('show');
advertPage.classList.remove('show');
menuBar.classList.remove('show');
});
});