How can I hide my sticky header after 100px on scroll down and show it again after 1px on scroll up?
I'm at this point:
$(window).scroll(function() {
var height = $(window).scrollTop();
if ($(window).scrollTop() > 100) {
$("#header").fadeOut(300); } else {
$("#header").fadeIn(300); } });
It works, but I would like to show the header again on scroll up immediately, not at 100 px from the top.