Navbar transparent when returning to fixed position

I’m having some trouble getting the header on our website to behave.

The goal is for the header to be solid when in the fixed top position, with the background value rgb(248,248,248). It appears all the settings are correct to achieve that, however when the header returns to the top fixed position after being transparent during scroll, it does not return to solid, and the site background can be seen through, which is distracting.

Any advice appreciated -

http://www.devsite.chasebrks.com/

Hi,

Please change your Js Code to this.

jQuery(document).ready(function($) {

    $(window).scroll(function() {
        if ($(this).scrollTop() <= 0) {
          $('.x-navbar').removeClass('x-navbar-fixed-top');
}
});

});

Then add this in Custom CSS

.x-navbar {
     background-color: #fff;
     transition: background .5s ease-in-out;
}

.x-navbar.x-navbar-fixed-top {
     background-color: rgba(255,255,255, 0.75);
}

Hope that helps

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.