9 lines
294 B
JavaScript
9 lines
294 B
JavaScript
let body = document.querySelector('body');
|
|
document.querySelector('#mobile-menu').addEventListener('click', (e) => {
|
|
if (body.classList.contains('mobile-menu-open')) {
|
|
body.classList.remove('mobile-menu-open');
|
|
} else {
|
|
body.classList.add('mobile-menu-open');
|
|
}
|
|
});
|