This version is old school.
Please find jQuery plugins on npm.
jQuery mb.menu
A powerful jQuery component that lets you easily build a multilevel menu or contextual menu (right click) in an intuitive way!<br>You can add as many sub menus as you want and if those are not defined in the page, the component will automatically get them via ajax from a specified template url.