Having a weird issue in Chrome with the navbar-brand element of my sites bootstrap navigation menu.
We have a larger site logo displayed in the header section, and a smaller logo within the navbar-brand element of the navbar with display none by default. When scrolling down the page we then affix the navbar to the top of the browser and show() the navbar-brand element. When scrolling back up, the small logo should then hide() as the large logo is then visible.
This works in IE and Firefox without issue, but only partially works in Chrome. The show on scroll down works as does the hide on scroll up, but as you will see, the menu items that shift across for the logo to show, do not shift back when the logo is hidden. If you then click on any of the menu entries, the menu entries shift back to where they should be.
The code in itself is as simple as can be so i dont believe that to be at fault;
$(window).scroll(function () {
if ($(this).scrollTop() > $('header').height()) {
$('.navbar-brand').show();
} else {
$('.navbar-brand').hide();
}
});
I have a cut down jsfiddle illustrating the issue at https://jsfiddle.net/96jqnu38/3/
I can't seem to suss how to get chrome to redraw/repaint the menu entries back into position.
(Chrome 43.0.2357.81 on Windows 8.1)