Prevented back-to-top showing on flexbox-body pages

Fixes #824
This commit is contained in:
Dan Brown 2018-05-20 09:48:11 +01:00
parent 77727e7e50
commit 93147f4340
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9

View File

@ -6,6 +6,12 @@ class BackToTop {
this.targetElem = document.getElementById('header');
this.showing = false;
this.breakPoint = 1200;
if (document.body.classList.contains('flexbox')) {
this.elem.style.display = 'none';
return;
}
this.elem.addEventListener('click', this.scrollToTop.bind(this));
window.addEventListener('scroll', this.onPageScroll.bind(this));
}