Skip to content
Advertisement

Full screen overlay menu toggle

I want to create a full screen overlay menu. I am not able to close the menu on anchor click eg. if we click on Home. It scrolls down to the section but does not close the overlay. I have tried adding some jquery but I am not able to do it. I have tried to toggle the menus as done on clicking the cross but no success.

JavaScript
JavaScript
JavaScript

Advertisement

Answer

I tried this code on my side and noticed one small change would work in this case.

You are selecting anchors(a) using wrong selector. As ‘fulloverlay’ is the Id of the parent nav element so instead of selecting it like:

JavaScript

You can write like this:

JavaScript

then it works.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement