Dear Themeco team.
I am a Pro unlimited. I am using header builder since I want that my header is shown at the top page with transparent background, then, if you scroll down, the X-BAR disappear until the user will scroll up so the X-BAR is shown again but with a solid background color.
This is the Dev-website: https://wp.gruppocastaldi.it
I am using this CSS in the Global customizer
> .x-bar {
transition: all 0.5s;
position: fixed;
width: 100%;
}
.x-bar.scrollUp {
transform: translateY(-65px);
background-color: rgba(35, 35, 35, 0.4);
}
and this JS in the JS Global Customizer
> jQuery(document).ready(function ($) {
'use strict';
var c, currentScrollTop = 0,
navbar = $('.x-bar');
$(window).scroll(function () {
var a = $(window).scrollTop();
var b = navbar.height();
currentScrollTop = a;
if (c < currentScrollTop && a > b + b) {
navbar.addClass("scrollUp");}
else if (c > currentScrollTop && !(a <= b)) {
navbar.removeClass("scrollUp");}
c = currentScrollTop;
});
});
Please, could you be so kind to help me?