Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1298288
    emormile
    Participant

    Hi – Situation: I’m using the Integrity stack and have a layerslider above the masthead on the homepage with a bottom anchor link. The navbar/logo are set to “fixed-top” and “stacked” and I have added custom CSS to hide the navbar leaving just the logo centered… all works fine, but I want the logo bar to remain fixed as you scroll down the page on desktop & mobile. Currently it scrolls with the rest of the page as if “static”.

    I can provide a private test link if necessary.

    Thanks

    #1298321
    Thai
    Moderator

    Hi There,

    Please provide us with your website URL so we can take a closer look.

    Thanks.

    #1298374
    emormile
    Participant
    This reply has been marked as private.
    #1298481
    Nabeel A
    Moderator

    Hi again,

    Please add the following jQuery script in your Customizer via Appearance > Customize > Custom > Edit Global Javascript

    function sticky_logobar() {
    	var layer_slider_height = jQuery('.x-slider-container').height()
    	jQuery(window).scroll(function(){
    		if (jQuery(this).scrollTop() > layer_slider_height) {
    			jQuery('.x-logobar').addClass('x-navbar-fixed-top');
    		} else {
    			jQuery('.x-logobar').removeClass('x-navbar-fixed-top')
    		}
    	});
    	jQuery('header.masthead').css('height', jQuery('.x-topbar').height() + jQuery('.x-navbar').height());
    }
    jQuery(document).ready(function($){
    	sticky_logobar();
    });
    jQuery(window).resize(function($){
    	sticky_logobar();
    });

    And then add the following code in your Customizer via Appearance > Customize > Custom > Edit Global CSS:

    @media screen and (max-width: 979px) {
    .x-navbar-fixed-top, .x-navbar-fixed-left, .x-navbar-fixed-right {
        position: fixed !important;
    }
    }

    Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!

    #1298552
    emormile
    Participant

    Works great!
    That JS is above my head.
    THANKS!

    #1298569
    Nabeel A
    Moderator

    Glad we could help 🙂

    Cheers!

    #1314544
    emormile
    Participant

    Hi again – the above worked great, but I realized that I overlooked something. I am using a Superfly menu for desktop, but want to use the standard hamburger menu for mobile. I am able to hide the Superfly, but unable to figure out how to get the navbar menu button to show up on mobile. Would you be able to assist?

    #1314635
    Jade
    Moderator

    HI there,

    Please add this code in the customizer:

    @media (max-width: 979px) {
        .masthead-stacked .x-navbar {
            display: block;
            visibility: visible !important;
        }
    
    }

    Hope this helps.

    #1315100
    emormile
    Participant

    Excellent. Thank you.

    #1315212
    Nico
    Moderator

    Happy to hear that.

    Feel free to ask us again.

    Thanks. Happy new year 🙂

  • <script> jQuery(function($){ $("#no-reply-1298288 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>