Hello,
I was wondering if there’s an easy way to get my fixed topbar to not jump so bad when scrolling down.
https://supeckseptic.com/
It doesn’t jump on desktop, only on mobile.
The CSS I’m using is:
.x-topbar.x-topbar-fixed {
position: fixed;
width: 100%;
top: 0;
}
And the JS is:
jQuery(function($) {
$(window).scroll(function(){
if($(window).scrollTop() > 0 ){
$('.x-topbar').addClass('x-topbar-fixed');
} else {
$('.x-topbar').removeClass('x-topbar-fixed');
}
});
});
Thanks!