Feb 23, 2017 · 1 min read
Thanks for this — I use it frequently, although I add:
if(!$(window).scrollTop()) {
$(‘header’).removeClass(‘nav-up’).removeClass(‘nav-down’);
}
so that it restores the original navigation at the top (I usually have a different coloured background on the .nav-down