Hello There,
I think it is a bit out of the scope, i still try it here, maybe you will be able to help me with a quick fix.
thanks a lot.
I am trying to get a navbar that is disappearing while scrolling down, and reappearing while scrolling up.
So far i tried this :
i’m using pro and my header bar is set to fixed
var prevScrollpos = window.pageYOffset;
window.onscroll = function() {
var currentScrollPos = window.pageYOffset;
if (prevScrollpos > currentScrollPos) {
document.getElementById(“x-bar”).style.top = “0”;
} else {
document.getElementById(“x-bar”).style.top = “-100px”;
}
prevScrollpos = currentScrollPos;
}
But it does not seems to work properly. Am i missing something obvisous ? thank you very much guys
Keep up the good work !