Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #537621

    I used the following CSS on this page: http://www.sethoops.org/home-4/

    Is there a better / less jerky way to do this? I’d prefer it just scroll up and out of view instead of showing white under the menu.

    .header-scrolled .container.av-logo-container {display:none;}

    #537670

    Hey KelseyCurran!

    I have loaded the site and it seems like it has that effect now. Jave you managed to do it?

    Cheers!
    Basilis

    #537675

    No, when you scroll up slowly you’ll see the white background peek out because of the entry’s padding when the logo is present. I don’t want it to disappear when scrolled, just to scroll up.

    #538194

    Hi!

    Please try adding following code to Quick CSS as well

    .container.av-logo-container {
        transition: all 1s ease-in-out;
    }
    .header-scrolled .container.av-logo-container {display:none; transition: all 1s ease-in-out;}

    Best regards,
    Yigit

    #558009

    Can you look at it now? Why does it display the logo and the white background before transitioning to “-scrolled” where it dissapears. Can you help me skip that step?

    #559033

    Hey!

    Please try this in the functions.php file:

    
    // header transparency logo switch
    function add_custom_script(){
    ?>
    <script>
    (function($){
    	var win = $(window);
    	win.scroll(function() {
    		if(win.scrollTop() == 0) {
    			$(".av_header_top:not('av_header_transparency') .av-logo-container").css('display', 'block');
    		} else {
    			$(".av_header_top:not('av_header_transparency') .av-logo-container").css('display', 'none');
    		}
    	});
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');

    Remove browser cache then reload the page.

    Regards,
    Ismael

    #565010

    That crashed the site. Is the last PHP supposed to remain open?

    #565021

    Ok!! It’s working. Just had to place it somewhere else. Thank you!

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Hide Logo On Scroll’ is closed to new replies.