const menuItemLinks - document -querySelectorAl1(' .menu-item a'); const menuToggle - document.querySelector (' .bricks-mobile-menu-toggle") const handleclick = () => { menuToggle.click() } if (window.matchMedia(' (max-width: 768px) ').matches) { menuItemLinks.forEach(link =› { link.addEventListener('click', (event) => { handleClick(); }) }) }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter