Removed top detection

This commit is contained in:
alistair3149 2019-10-28 19:19:06 -04:00
parent 2c79e5c86b
commit f2154cde31

View file

@ -28,10 +28,7 @@ function hasScrolled() {
if (Math.abs(lastScrollTop - st) <= delta) if (Math.abs(lastScrollTop - st) <= delta)
return; return;
// Remove class when header is back in place if (st > lastScrollTop && st > navbarHeight) {
if ($(document).scrollTop == 0) {
$('header').removeClass('nav-down');
} else if (st > lastScrollTop && st > navbarHeight) {
// If scrolled down and past the navbar, add class .nav-up. // If scrolled down and past the navbar, add class .nav-up.
// Scroll Down // Scroll Down
$('header').removeClass('nav-down').addClass('nav-up'); $('header').removeClass('nav-down').addClass('nav-up');