I have a responsive fixed top menu that opens after clicking on the Menu icon. Now, I would like to close the menu automatically when one clicks on one of the menu items (when the size of screen is smaller than 680px). Otherwise it covers part of the section that slides up. When the menu is closed only the menu icon may be visible.
Close responsive menu after click
in JavaScript
Posted
Hi,
I have a responsive fixed top menu that opens after clicking on the Menu icon.
Now, I would like to close the menu automatically when one clicks on one of the menu items (when the size of screen is smaller than 680px). Otherwise it covers part of the section that slides up.
When the menu is closed only the menu icon may be visible.
I have used the code from the following link: http://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_topnav