My header/menu is flickering on scrolling down till the "point of shrinking" (in my example on 300px). I've tested different heights but every time I came to "the point" it's flickering because it's adding and deleting the class "small".
/* === Shrink Header on Scroll === */
var header = $('.site-header');
$(window).scroll(function() {
var scroll = $(window).scrollTop();
if ( scroll >= 300 ) {
header.addClass('small');
}
else {
header.removeClass('small');
}
});
I can produce this flickering only on Chrome and with slow scrolling (Version 86.0.4240.111)