Hello,
I would like my top bar to be fixed like my navigation menu. I had a look at the solutions already provided on the forum and followed the instructions but it makes my top bar transparent.Here is what I’ve done :
Please add the following code under Customizer > Custom > Global Javascript:
jQuery(function($) {
$(window).scroll(function(){
if($(window).scrollTop() > 420 ){
$(’.x-topbar’).addClass(‘x-topbar-fixed’);
} else {
$(’.x-topbar’).removeClass(‘x-topbar-fixed’);
}
});
});
Please also add this CSS under Customizer > Custom > Global CSS:
.x-topbar.x-topbar-fixed {
position: fixed;
width: 100%;
top: 0;
}
.x-navbar.x-navbar-fixed-top {
top: 46px;
}
I already have the following CSS for my top bar :
.x-topbar .p-info { width: 100%;}
.x-topbar .p-info, .x-topbar .p-info a, .x-topbar .x-social-global a {
font-size: 13px !important;
}
Thanks a lot in advance for your help !