Jump to content



Member Since 06 Jun 2017
Offline Last Active Jun 12 2017 03:10 PM

Topics I've Started

Disabling Body Scroll On Menu Overlay Or Modal

06 June 2017 - 05:16 PM

Hello and good afternoon!


I am fairly new to the CS-Cart platform and find it relatively easy to work with, however, I am having an issue that is stumping me.


We are working on a website that uses hamburger navigation rather than a traditional menu (we are using the plugin provided by the cs-cart developers for this: http://marketplace.c...enu.html?sl=en)

The issue we are having (which is also apparent on their demo site) is that the page will still scroll when the menu us open. 


We have made many attempts to disable the BODY scroll while the CSS class for the menu overlay (or even just the menu itself) is active. We have done this using jquery & CSS.


The issue is that even when setting the body overflow to hidden (through the custom CSS section) this will not even apply to the site - before using the jquery to switch / add the css class.


Has anyone had this issue before or come up with a solution? Is there a reason why the normal method of .body{ overflow: hidden;) will not work?


Any help would be greatly appreciated, the demo site can be seen at: http://cs-cart.bluepointdigital.comfor reference.


Lastly, the solution we are working toward will also have the same effect when someone clicks on "my account" or on "shopping cart" as we have used CSS to make a similar-style sidebar for these items.


Thank you for all your help and I look forward to any replies.