Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1267611
    ttorabi
    Participant

    Hi, I’m using “Agency” Demo on Theme X.
    The website I am working on is http://www.innovects.com
    Wordpress Version: 4.6.1
    X Version: 4.6.2
    Cornerstone plugin version: 1.3.1

    I’m looking to have the logo sticky as the header scrolls. Right now only the nav bar is sticky.
    Is this possible with Theme X?

    Thanks!

    #1267805
    Paul R
    Moderator

    Hi,

    To achieve that, you can add this under Custom > Edit Global Javascript in the Customizer.

    
    jQuery(document).ready(function($){
        $(window).scroll(function(){
            var $logobar= $('.x-logobar').offset().top - $('#wpadminbar').outerHeight();
          if ( $(this).scrollTop() >= $logobar ) {
              $('.x-logobar').addClass('x-logobar-fixed-top');
          } else {
              $('.x-logobar').removeClass('x-logobar-fixed-top');
          }
    
        })
    });
    

    Then add this in Edit Global CSS

    
    .x-logobar-fixed-top {
               position:fixed;
               width:100%;
               top:0;
               z-index:99999;
         }
    
    .x-navbar.x-navbar-fixed-top {
       top:106px;
    }
    

    Hope that helps.

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