This mobile optimised dropdown was designed by Patrick Rice. When you click on the menu you get a dropdown of the navigation menu, clicking on it again will hide it from view.
If you are having trouble with the pen, try the archived copy on GitHub
Mobile Dropdown Menu Snippet
See the Pen Mobile Dropdown Menu by Patrick Rice (@PatrickRice) on CodePen.0