I have a site with three bars in header pro:
http://jazznew.thejazzcorner.com/
When the site is first scrolled (10 px or more) I want the hidden secondary menu and logo to replace the first one entirely, including when the site is scrolled back to the start at <10px. I started trying out some JS to change the CSS after scrolltop but it’s rather sloppy. I am not opposed to only using 2 bars and JS to make the smaller logo appear if that’s easier.
Here’s my testing JS. I have stripped it out while I await a reply.
(function ($) {
$(document).ready(function(){
//var H = $(window).height();
$(window).scroll(function () {
// set distance user needs to scroll before we start fadeIn
if ($(this).scrollTop() > 10 ) {
$('#topbar').css({'opacity': 1, 'visibility': 'visible'});
$('#middlebar').css({'opacity': 1, 'visibility': 'visible'});
$('#bottombar').css({'opacity': 0, 'visibility': 'hidden'});
} else {
$('#topbar').css({'opacity': 0, 'visibility': 'hidden'});
$('#middlebar').css({'opacity': 0, 'visibility': 'hidden'});
$('#bottombar').css({'opacity': 1, 'visibility': 'visible'});
}
});
});
}(jQuery));
