Collapse Sub Menu
An example of collapsed sub menus within a mega menu can be found in the demo menu on the homepage of megamenu.com:
To collapse a sub menu within a mega menu, go to Appearance > Menus and open the mega menu settings for the parent item. At the bottom of the General Settings tab, enable ‘Collapse sub menu’.
Collapsed sub menus appear on click (not hover, as it results in terrible menu design). If you want the parent item to simply toggle the sub menu (and the link itself to not be reachable), enable the “Disable Link” option in the menu item settings.