...
|
...
|
@@ -140,16 +140,14 @@ |
|
|
let ghost2 = false;
|
|
|
let ghost3 = false;
|
|
|
|
|
|
let myHeaderTop = $('.my-header').offset().top;
|
|
|
|
|
|
if (myHeaderTop < -40) {
|
|
|
if (window.scrollY > 40) {
|
|
|
ghost = false;
|
|
|
ghost2 = false;
|
|
|
ghost3 = false;
|
|
|
} else if (myHeaderTop < -25) {
|
|
|
} else if (window.scrollY > 25) {
|
|
|
ghost = false;
|
|
|
ghost3 = true;
|
|
|
} else if (myHeaderTop < -10) {
|
|
|
} else if (window.scrollY > 10) {
|
|
|
ghost = false;
|
|
|
ghost2 = true;
|
|
|
}
|
...
|
...
|
@@ -167,17 +165,15 @@ |
|
|
return false;
|
|
|
});
|
|
|
|
|
|
let body = $('body');
|
|
|
|
|
|
body.on('touchmove', () => {
|
|
|
window.addEventListener('touchmove', () => {
|
|
|
this.toggle();
|
|
|
});
|
|
|
|
|
|
body.on('scroll', () => {
|
|
|
window.addEventListener('scroll', () => {
|
|
|
this.toggle();
|
|
|
});
|
|
|
|
|
|
body.on('visibilitychange', () => {
|
|
|
document.addEventListener('visibilitychange', () => {
|
|
|
if (!document.hidden) {
|
|
|
this.reload();
|
|
|
}
|
...
|
...
|
|