Fixed menu and footer on ios devices

This commit is contained in:
Dan Brown 2016-03-21 18:23:47 +00:00
commit 70151e1628

View file

@ -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