Fixed menu and footer on ios devices
This commit is contained in:
parent 8558387c29
commit 70151e1628
3 changed files with 40 additions and 10 deletions
| @ -1,4 +1,27 @@ | |||
| ||||
// Mobile menu | ||||
| ||||
var menuButton = document.getElementById('menu-button'); | ||||
var menuDropDown = document.querySelector('header div.inner'); | ||||
| ||||
menuButton.onclick = function(event) { | ||||
var menuClass = menuDropDown.className; | ||||
var visible = menuClass.indexOf('showing') !== -1; | ||||
if (visible) { | ||||
menuDropDown.className = menuClass.replace('showing', ''); | ||||
} else { | ||||
menuDropDown.className += ' showing'; | ||||
} | ||||
event.stopPropagation(); | ||||
}; | ||||
| ||||
document.body.onclick = function(event) { | ||||
menuDropDown.className = menuDropDown.className.replace('showing', ''); | ||||
event.stopPropagation(); | ||||
}; | ||||
| ||||
// PhotoSwipe | ||||
| ||||
var initPhotoSwipeFromDOM = function(gallerySelector) { | ||||
| ||||
// parse slide data (url, title, size ...) from DOM elements | ||||
| |
Loading…
Add table
Add a link
Reference in a new issue