Sync: implement menu toggle functionality to manage body overflow state
This commit is contained in:
@@ -39,6 +39,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
toggle.addEventListener('click', () => {
|
||||
toggle.classList.toggle('open');
|
||||
nav.classList.toggle('open');
|
||||
document.body.classList.toggle('menu-open');
|
||||
const expanded = toggle.getAttribute('aria-expanded') === 'true';
|
||||
toggle.setAttribute('aria-expanded', !expanded);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user