mdhub/app/application/resources/site/js/_menu.js

9 lines
294 B
JavaScript
Raw Permalink Normal View History

2024-06-18 22:35:54 +05:00
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');
}
});