Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1234605
    Sam
    Participant

    I managed to create a transparent header with masthead set to 0 but I would like the logo and menu to disappear once user scrolls up.

    Is this possible?

    #1234713
    Paul R
    Moderator

    Hi,

    Thanks for writing in!

    You can add this under Custom > Edit Global CSS in the Customizer.

    
    .x-navbar.x-navbar-fixed-top {
       display:none;
    }
    

    Hope that helps.

    #1238275
    Sam
    Participant

    Hi Paul,

    This removes the navbar completely. Is this expected?

    #1238281
    Jade
    Moderator

    Hi Sam,

    Would you mind sharing your site URL so that we could take a better look at it?

    Thank you.

    #1239679
    Sam
    Participant
    This reply has been marked as private.
    #1240238
    Rupok
    Member

    Hi there,

    Thanks for writing back. Let’s use the solution below.

    #1. You can add this under Custom > JavaScript in the Customizer.

    jQuery(document).ready(function($) {
      $(window).scroll(function() {
        var scrollPos = $(window).scrollTop(),
            navbar = $('.x-navbar');
    
        if (scrollPos > 100) {
          navbar.addClass('hide-navbar');
        } else {
          navbar.removeClass('hide-navbar');
        }
      });
    });

    #2. Then add this under Custom > CSS in the Customizer.

    .x-navbar {
      transition: all 0.2s ease 0s;
    }
    .x-navbar.hide-navbar {
      opacity: 0;
    }

    Hope this helps.

    #1240604
    Sam
    Participant

    Hi Jade and Rupok,

    Thanks for your awesome support.

    Works like a charm.

    #1240644
    Thai
    Moderator

    Glad we’re able to help 🙂

    If you need anything else please let us know.

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