Jump to content
Search Community

Disable scroll when push over menu (off-canvas) is visible

icekomo test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I'm building a off-canvas push menu and everything is working, there are a few aspects I can't seem to figure out.

 

1. How to disable the scrolling of the content-wrapper.

 

2. How to only scroll the off canvas menu. Right now it scrolls the height of the website itself.

 

Here is a code pen to show you what issues I'm running into.

 

 

Thanks!

See the Pen LNwEWM by icekomo (@icekomo) on CodePen

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums,

 

We really try to keep our support focused on the GSAP API. This seems to deal a lot more with custom css or perhaps some fancy JavaScript.

 

I would recommend this tutorial and demo from Dennis

 

http://webdesign.tutsplus.com/tutorials/completing-our-draggable-off-canvas-menu-with-greensock--cms-24796

http://codepen.io/tutsplus/pen/XmEawa

 

Worth checking out how everything is structured. You will notice that when the menu is open there is a custom scrollbar for scrolling the page.

 

Here is a whole collection of off-canvas menus

http://codepen.io/collection/AILzp/

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...