Jump to content

.London Domains - £4

Scrolling issue on mobile...

css jquery

  • Please log in to reply
No replies to this topic

#1 notxalckram

  • Member
  • Newbie
  • 138 posts

Posted 18 September 2017 - 14:43

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?



  • 0

Also tagged with one or more of these keywords: css, jquery

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users