PDA

View Full Version : Responsive Hybrid Menu - want mobile menu to collapse after selection made



ngors
09-05-2017, 02:15 AM
Script: Responsive Hybrid Menu
http://www.dynamicdrive.com/dynamicindex1/responsivehybridmenu/index.html

My question concerns the mobile menu and what happens after the mobile menu is expanded on the left side by clicking on the mobile menu icon.

The script at this point, seems to require the user to again click on the mobile menu icon in order to collapse the opened mobile menu.

I would prefer to have the mobile menu automatically collapse after a selection is made of an anchor leading to a document destination. Of course I don't want it to collapse when the selection is opening up a sub-menu.

Is there any way to achieve this outcome?

Also I changed the css #mobile-menu position from "absolute" to "fixed" since I prefer to have the mobile menu to become visible on the screen when activated even if the page is long and scrolled to the bottom. Hopefully that will not cause any issue with the various browsers?

ddadmin
09-06-2017, 03:48 AM
Try the below modified hybridmenu.js, which should collapse a link within the mobile menu when clicked on.

ngors
09-07-2017, 04:53 PM
that's perfect. Thank you so much!