Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1193058
    Missy S
    Participant

    Hello,

    I was able to hide my logo on all pages until scroll but for some reason it only works after I scroll down and scroll back up. I only need to hide logo on my homepage only until scroll down.

    Here is the java script I am using:

    /* Transparent Navbar on Scrolling – jQuery */
    jQuery(document).ready(function($) {
    $(window).scroll(function(){
    if ($(this).scrollTop() > 100) {
    $(‘.masthead.masthead-inline’).addClass(‘mi-fixed-top’);
    } else {
    $(‘.masthead.masthead-inline’).removeClass(‘mi-fixed-top’);
    }
    });
    });
    /* hide logo until Scrolling – jQuery */
    jQuery( function( $ ) {

    $(document).ready(function(){
    $(window).bind(‘scroll’, function(){
    $(“.x-brand.text”).toggle($(this).scrollTop() > 200);
    });
    });

    });

    #1193065
    Missy S
    Participant
    This reply has been marked as private.
    #1193067
    Missy S
    Participant
    This reply has been marked as private.
    #1193071
    Missy S
    Participant
    This reply has been marked as private.
    #1193457
    Missy S
    Participant

    Hello,

    I figured it out. I just needed to add css:

    .home .x-brand{
    display: none;
    }

    Works beautifully!

    But now I have another problem. On my single pages the logo is there but disappears once I scroll down.

    #1193476
    Christopher
    Moderator

    Hi there,

    Please remove following code from Customize -> Custom -> JavaScript :

    jQuery( function( $ ) {
    
    $(document).ready(function(){ 
    $(window).bind('scroll', function(){
    $(".x-brand.text").toggle($(this).scrollTop() > 200);
    });
    });
    
    });

    Thanks.

    #1193533
    Missy S
    Participant

    Hi Christopher,

    Your solution worked for my single pages but without the code I no longer have a logo that appears when I scroll down my homepage.

    LOL, so now I am back to where I started. Please have another look.

    Thank you!

    #1193584
    Paul R
    Moderator

    Hi,

    Please change your js code to this.

    
    jQuery(function($) {
    $(window).bind('scroll', function(){
         $(".home .x-brand.text").toggle($(this).scrollTop() > 200);
    });
    });
    

    Hope that helps.

    #1193597
    Missy S
    Participant

    Perfect! THANKS PAUL!!!!

    #1193643
    Thai
    Moderator

    If you need anything else please let us know.

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