I'm trying to create the submenu thru an ajax call sending the parent element as a parameter to get the submenu items on the open event but is not working.
Has anyone have an idea how this can be done?
Thanks
You can utilize the append method like
menu.append({text: submenu}, parentMenu);
where
i tried it myself, here is the example
a bit of explanation of the example :
ps : there is still 1 issue if you select the menu twice it will append the submenu twice, you need to handle this issue