You can add the following script to your page and call it at the time you need:
Is it fit for your scenario?
You may have noticed the var ddmenu = new McDdMenu(ddmenuOptions); in the ddmenu.js, but you cannot test it by
if(ddmenu) {return true;}
as even if ddmenu is initialized, the DOM may not be ready and the ddmenu is still waiting for the DOM ready event to populate the menu.