no-scroll class on the body when the menu is opened or closed.no-scroll CSS class with overflow: hidden; to disable body scrolling.To prevent body scrolling when opening a fullscreen mobile navigation menu in Webflow, and then re-enable scrolling when closing the menu, follow these steps:
no-scroll class on the body element whenever your menu is opened or closed.
```javascript
<script>
function toggleMenu(open) {
document.body.classList.toggle('no-scroll', open);
}
</script>
```
no-scroll.
```css
.no-scroll {
overflow: hidden;
}
```
toggleMenu(true) function.toggleMenu(false).
To prevent body scrolling when a fullscreen mobile navigation menu is opened in Webflow, add a JavaScript function to toggle a no-scroll class on the body. This class, defined with overflow: hidden;, ensures scrolling is disabled. Set interactions on the menu to call this function with appropriate parameters to control the scroll state when the menu is opened or closed.