How to block scrolling when menu is open on mobile?

Hi there,

I managed to block scrolling when the menu is open on the desktop thanks to the class-adder video from Finsweet. Nevertheless, the menu is still scrolling on the mobile version and I can’t block it even after implementing the custom code given on the Finsweet video. Any help would be really appreciated. Many thanks for your time. Aurélien

Here preview webflow: Webflow - Drover Club

Here video : Finsweet Class Adder Webflow Interactions Tool

Here the custom code provided in the video to prevent scrolling on mobile IOS (I removed it from my page as not working):

Anyone who’s encountered this problem? Thank you

Is someone could provide me a solution, please?

Hi @Drover, thanks for your post, I took a look, the menu button is having class menu-button:

Shared with CloudApp

I would change the code to target $(.menu-button) instead of $(.nav-open) and then republish the page and check again.

Hi Cyberdave,

Thank you for your feedback. I managed to block the scrolling effect by setting up the left menu on “fixed” and by increasing the z-index. Have a nice one :slight_smile:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.