I am using a very simply script for a sticky header. But when scrolling up i want it to fade. Is that possible with the current script i am using?
$(window).scroll(function () {
if ( $(this).scrollTop() > 500 && !$('header').hasClass('open') ) {
$('header').addClass('open');
$('header').slideDown();
} else if ( $(this).scrollTop() <= 500 ) {
$('header').removeClass('open');
$('header').slideUp();
}
});