Home › Forums › JavaScript › Fixed nav on scroll – content jumps. › Reply To: Fixed nav on scroll – content jumps.
March 1, 2018 at 10:04 am
#267625
Participant
Thanks man, that looks like it works great! I was trying to use position: sticky
with a Polyfill, which looked like it worked fine but I also have a slide-out menu on mobile and although the plugin had a fix for sticky menus, when the menu was shown the nav bar would jump/flicker which didn’t look great! There fix works a lot better with position: fixed
though!
Out of interest, whats the code for .info-bar
do?
Also as I may have several .band
divs on a page, am I ok to use core = $('.band:first-child')
or maybe core = $('.page-head + .band')
to make sure it doesn’t interfere with anything else by accident?