Vanilla JavaScript menu

The menu on this page has been built with vanilla JavaScript. The code can be found in my GitHub repository.

A simple menu, usually taken from some existing library, but I have built it from scratch using only vanilla JavaScript, HTML and CSS.

Features:

The menu-items should be added as the list items to the list, according to the following template:

The menus should be added as:

with level-2 subitems (which need to be linked to the respective targets).