On my single page website, I am utilizing Zurb Foundation's fixed topbar which includes anchor links to different sections of the page. My goal is to have the mobile menu close automatically whenever a link inside it is clicked.
As it stands now, when a link is clicked, the page scrolls but the mobile menu remains open at the top of the page, out of sight.
In an older version of Foundation, I managed to find a solution by delving into the code. However, since updating to 4.3.1 to address another issue with the topbar, I have been struggling due to my limited knowledge of javascript.
It seems to me that triggering the event or function for closing the menu when a link is clicked would solve the problem. Previously, I added my code for handling link clicks on line 261.
When the mobile menu closes, the div containing the topbar has a .fixed class added to it, while the .expanded and .fixed classes are removed from the .topbar div.