I have a menu button within a fixed div at the top of my web page. The menu button opens up a full-screen div with menu items.
I'm using jQuery to .toggleClass the following code on the body tag.
This works great on desktop and laptop browsers, but on mobile, there is still a scrollbar. If I apply:
This fixes the scroll issue but if the user is halfway down the web page and then clicks the menu button. It scrolls the user to the top as it loads the menu.
I've tried wrapping the entire page in another div and applying the overflow:hidden to this, this still doesn't work.
Does anyone know of a fix for this problem?