Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #909385
    mymei
    Participant

    I recently tested a few forums to make the navigation transparent and added jquery to the custom CSS to make it white when scrolling (which worked initially), but it’s not working now. Please advise. Thanks in advance!

    Site: New.TheBedrock.com

    #909671
    Joao
    Moderator

    Hi There,

    Please add this Code to your Appearence / Customizer / CSS

    body.home .x-navbar-wrap {
         height: auto !important;
    }
    
    body.home .x-navbar {
         background-color:transparent;
         border:0;
         box-shadow:none;
         position: fixed;
         width:100%;
    }
    
    body.home .x-navbar-solid {
         background-color:white;
    

    And this Code to Appearence / Customizer / Javascript

    jQuery(function($) {
        $(window).scroll(function(){ 
            if($(window).scrollTop() >50) {
                  $('.x-navbar').addClass("x-navbar-solid");
            }else {
                  $('.x-navbar').removeClass("x-navbar-solid");
            }
        });
    });

    Hope that helps

    Joao

    #911291
    mymei
    Participant

    The code provided still appears to not do anything. Please let me know if there is conflicting code elsewhere and/or whether code needs to be added/changed.

    Thanks in advance.
    New.TheBedrock.com

    #911802
    Jade
    Moderator

    Hi Cebrina,

    Please add this CSS:

    .x-navbar-fixed-top {
        background-color: #fff !important;
        padding-bottom: 20px;
    }

    Hope this helps.

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