How to close full-screen menu after clicking anchor links?

Hey there!

Nice site you got there :slight_smile:

You could add some js to click on the menu toggle when the user clicks on one of the anchor links.

Give each link on the fullscreen menu a custom attribute in order to attach an eventHandler (The value is unimportant):

Paste this code at the end of the body tag, like above or below your jquery code:

let fullscreenLinks = document.querySelectorAll('a[toggle-menu]')

fullscreenLinks.forEach((fullscreenLink) => {
  fullscreenLink.addEventListener('click', () => {
    document.getElementById('menu-toggle').click()
  })
})

Hope this works, only tested it in my devtools console!

IE doesn’t support forEach on nodeList, if you need IE support, maybe use a classic loop instead :slight_smile: