Add class on same interaciton

Hello!
I’ve followed Pixelgeek tutorial on a full screen navigation.

I’ve made some tweaks because i have a custom hamburger menu.
Now i’m stuck because in the custom code we tell the open div to add a class, and when closing (different button) the class is gone. This code is to prevent scrolling when the navigation is open.
My problem is that the open and close button is the same, so the class is added, but never get’s deleted. So the problem is once i open the menu, and when closing it I can’t scroll anymore.

Could anybody please help me?
Thank you!


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

@PixelGeek Could you maybe help me on this one? Thank you!

Bump - still stuck on this one, could anyone help me?
Thanks!

I am in the same boat. My menu doesn’t use a navbar element, it’s just a div block trigger. I’ve tried several pieces and variations of the code (I’m no expert at javascript) and can’t seem to stop the page from scrolling when the menu is open :frowning:

Share Link