it seems that the latest version of the code creates the menu options and insert them into the DOM before the user clicks on the trigger.
This is a waste of DOM nodes if there is a lot of menu triggers on the page.
Should only create the DOM when the user clicks on the menu trigger.
it seems that the latest version of the code creates the menu options and insert them into the DOM before the user clicks on the trigger.
This is a waste of DOM nodes if there is a lot of menu triggers on the page.
Should only create the DOM when the user clicks on the menu trigger.