Tagged: x
-
AuthorPosts
-
September 13, 2016 at 12:38 am #1172542
TheDudeParticipantHi there,
I’m developing on local – so I can’t provide login detailsOn the homepage I have a transparant menu and when I scroll down, it turns white.
So far so good but I have a problem with the other pages.
The menu is transparant but when scrolling down, they stay transparant (it doesn’t change color to white)
Any idea how to fix this?Cheers
I have this in the global css
.x-navbar {
position:absolute;
width:100%;
height: 60px;
background-color:transparent !important;
box-shadow: none;
border: 0;
}
body.x-navbar-fixed-top-active .x-navbar-wrap {
height: auto;
}.x-navbar-wrap {
height: auto !important;
}.x-navbar {
background-color:transparent;
border:0;
box-shadow:none;
position: fixed;
width:100%;
}.x-navbar-solid {
background-color:white;
}@media (min-width:979px){
body.home .x-navbar.x-navbar-fixed-top {
background-color: #fff !important;
}and this in the global javascript
jQuery(function($) {
$(window).scroll(function(){
if($(window).scrollTop() >50) {
$(‘.x-navbar’).addClass(“x-navbar-solid”);
}else {
$(‘.x-navbar’).removeClass(“x-navbar-solid”);
}
});
});jQuery(function($) {
$(window).scroll(function (event) {
var scroll = $(window).scrollTop();
if(scroll==0){
$(‘.x-navbar’).removeClass(‘x-navbar-fixed-top’);
}
});
});jQuery(function($){
$(‘.smooth-scroll’).click(function(e){
e.preventDefault();$(‘html,body’).animate({
scrollTop: $(‘#’ + $(this).attr(‘href’).split(“#”).slice(-1)[0] ).offset().top – $(‘.x-navbar’).height()
},700 ,’swing’);
});
});September 13, 2016 at 3:22 am #1172682
Paul RModeratorHi,
You can add this under Custom > Edit global CSS in the Customizer.
.x-navbar.x-navbar-solid { background-color:#fff !important; }Hope that helps.
September 13, 2016 at 4:57 am #1172776
TheDudeParticipantOoh yeah baby….it works!!!!
Thanks
September 13, 2016 at 5:54 am #1172842
FriechModeratorYou’re more than welcome, glad we could help.
Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1172542 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
