mirror of
https://github.com/StarCitizenTools/mediawiki-skins-Citizen.git
synced 2024-11-14 18:15:49 +00:00
Fix hover header
This commit is contained in:
parent
21b26a6509
commit
213d5bcab4
|
@ -28,13 +28,13 @@ function hasScrolled() {
|
|||
if (Math.abs(lastScrollTop - st) <= delta)
|
||||
return;
|
||||
|
||||
// If scrolled down and past the navbar, add class .nav-up.
|
||||
if (st > lastScrollTop && st > navbarHeight) {
|
||||
// Remove class when header is back in place
|
||||
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.
|
||||
// Scroll Down
|
||||
$('header').removeClass('nav-down').addClass('nav-up');
|
||||
} else if (document.scrollTop == 0) {
|
||||
// Remove class when header is back in place
|
||||
$('header').removeClass('nav-down')
|
||||
} else {
|
||||
// Scroll Up
|
||||
if (st + $(window).height() < $(document).height()) {
|
||||
|
|
Loading…
Reference in a new issue