Created
February 26, 2017 22:45
-
-
Save crestinglight/4f0e9cad53eb865a7974c232bf1199c9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| window.addEventListener("load", function(){ | |
| function showHideMenu(e){ | |
| e.preventDefault(); | |
| if (menuBlock.style.display === "none"){ | |
| menuBlock.style.display = "flex"; | |
| } | |
| else if (menuBlock.style.display === "flex"){ | |
| menuBlock.style.display = "none"; | |
| } | |
| } | |
| var menuBlock = document.getElementsByClassName("menu")[0]; | |
| menuBlock.style.display = "none"; | |
| var burger = document.getElementsByClassName("burger")[0]; | |
| burger.addEventListener('click', showHideMenu); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment