Tagged: , ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #748888
    #748901

    Hey mikschne,
    To hide the logo when scrolling down, ensure your logo is in Enfold Theme Options > Header > Transparency Logo
    After that, use this code in the General Styling > Quick CSS field:

    .header-scrolled .logo img { display: none; }

    Best regards,
    Mike

    #748994

    Thank you Mike!

    But that doesn’t work. Why does the Logo have to in “Transparency Logo” at all? Isn’t this just CSS?
    But ok, I put it in and added the code, but Logo is still visible when scrolling down.

    Any other idea?

    Regards,
    Mike

    #749060

    Hi Mike,
    Ok, lets start over (undo above) by adding this code to your functions.php to hide the logo on scroll:

    function add_hide_logo(){
    ?>
    <script>
    jQuery(window).scroll(function(){
    if(jQuery(this).scrollTop() > 100) jQuery('.container.av-logo-container').fadeOut('slow');
    if(jQuery(this).scrollTop() < 100) jQuery('.container.av-logo-container').fadeIn('slow');
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_hide_logo');

    When editing functions.php you should use the child theme, Read about it & Get it here
    Best regards,
    Mike

    #749878

    Thanks Mike!

    It works. But it’s not the most elegant way, not pretty smooth, if you know what I mean. :)
    Maybe I have to deal with the fact, that the logo is not hiding when scrolling down.

    Thanks anyway.

    Regards,
    Mike

    #750206

    Hi,
    You can change the screen distance at which it hides by changing the “100” to 50 or 200.
    You can also change the fadeOut / fadeIn options to fast, slow, or a number that represents thousands of a second, such as ‘2000’, to control the time of the fade.
    I hope these options help you refine your logo hiding experience.

    Best regards,
    Mike

    #750506

    Thanks for your help. I’ll put that on my list for the next weeks… :)

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Sticky Header: Hide the Logo when scrolling down’ is closed to new replies.