4 var menuButton = document.getElementById('menu-button');
5 var menuDropDown = document.querySelector('header div.inner');
7 menuButton.onclick = function(event) {
8 var menuClass = menuDropDown.className;
9 var visible = menuClass.indexOf('showing') !== -1;
11 menuDropDown.className = menuClass.replace('showing', '');
13 menuDropDown.className += ' showing';
15 event.stopPropagation();
18 document.body.onclick = function(event) {
19 menuDropDown.className = menuDropDown.className.replace('showing', '');
20 event.stopPropagation();