This is the code of the "Accordion Menu Generator", a free krpano plugin.
Accordion Menus come handy because they are spacesavers in rich applications that need to have their content easily accessible. Especially in mobile devices, accordions menus are found everywhere. According to wikipedia: an accordion (in graphical user interfaces) is a vertically stacked list of items (e.g. labels or thumbnails). Each item can be expanded or stretched to reveal the content associated with that item. There can be zero or more items expanded at a time, depending on the configuration.
In our case I split the accordion menu in groups and events. Groups are the items that can be expanded and reveal the event buttons. A group can have numerous events.
For testing purposes I have prepared an dynamic example that processes custom parameters and generates the menu "on the fly".
There is also a tutorial on how the generator works
See the LICENSE file for license rights and limitations (MIT).