Clicking off hamburger menu takes me to the top of the page
I’m quite new to javascript and I have tried my hand at making a little menu with click event which you can find here. https://codepen.io/Laurie312/pen/YzxJJbx
I’m quite new to javascript and I have tried my hand at making a little menu with click event which you can find here. https://codepen.io/Laurie312/pen/YzxJJbx
I am confused by the steps on how to post code on stackoverflow. Please look at codepen for entire code:
I am building a website and ran across this issue.
I have a basic navbar which when viewed on mobile appears like a hamburger menu. The menu works fine. I have used pure HTML-CSS code for making this navbar. The issue is that the navbar is not closing when I click any link on the menu to navigate to a different section of the page.
I have added hamburger menu to my web application (MERN stack) for screen sizes below 500 px.