-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
22 lines (19 loc) · 978 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const hamburger = document.querySelector('.hamburger-menu');
const topNavList = document.querySelector('.top-nav-list');
const aboutSection = document.querySelector('.about-section');
const bottomHamburger = document.querySelector('.hamburger-line-bottom');
const topHamburger = document.querySelector('.hamburger-line-top');
const midHamburger = document.querySelector('.hamburger-line-middle');
hamburger.addEventListener('click', openNav);
hamburger.addEventListener('touchStart', openNav);
function openNav(event) {
hamburgerToggle();
topNavList.classList.toggle('top-nav-list-open');
}
//todo: Figure out why the hamburger breaks on mobile screen animation. For now September 29, 2020 taking it out of production by taking out the manage nav fxn.
function hamburgerToggle(event) {
console.log('clicked');
bottomHamburger.classList.toggle('bottom-ham-open');
topHamburger.classList.toggle('top-ham-open');
midHamburger.classList.toggle('middle-ham-open');
}