To have your Webflow menu automatically close after clicking a menu item linking to another section on the page, follow these steps:
```javascript
<script>
document.querySelectorAll('.w-nav-menu a').forEach(item => {
item.addEventListener('click', () => {
// This targets the open menu
const menu = document.querySelector('.w-nav-menu');
if (menu && menu.style.display !== 'none') {
// Close the navigation menu
Webflow.require('ix2').actions.general.hide(menu);
}
});
});
</script>
```
'.w-nav-menu' with your navigation menu class if it differs.
Add custom JavaScript to your Webflow project to ensure the navigation menu closes automatically when a menu item for another section on the page is clicked.