Build Menu After Page Load
Menucool Accordion Menu has a built-in function, init([id]), that can be used to init the menu after page load if the menu markup is not available during page load.
This demo provides an example of creating the accordion menu dynamically through a jQuery Ajax request.
Clicking on the buttons above will trigger a jQuery Ajax request to retrieve the menu markup. The callback function of the Ajax will populate the menu HTML, and then amenu.init() is called to initiate the menu.
Demo & Source Code
For details please read the source code of demo 7 that you can download from Accordion Menu