Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #658331

    Hi there,

    Can I make a logo also sticky when the menu is above the logo? And can I make the menu background color change when srolling?
    Please take a look at:

    Thanks in advance!

    Best regards, Annelies

    #659249

    Hi Annelies,

    Sorry for the late reply, I’m not 100% sure I understand what you mean by that. Could you try to explain a bit further what you are looking to achieve and/or post screenshots highlighting your intentions please?

    Thanks,
    Rikard

    #659287

    Hi Rikard,

    Sorry for the minimal explanation ;-)
    In private content I have the screenshots for you.

    Best regards, Annelies

    #660197

    Hi,

    Thank you for the detailed explanation. Please try this in the functions.php file:

    // custom script
    function add_custom_script(){
    ?>
    <script>
    (function($){
    	function g() {
    		var scrolled = $('.header-scrolled').length,
    			st = $(window).scrollTop();
    		if( st >= 99 ) {
    			$('.av-section-bottom-logo').insertAfter('#header_main');
    			$('.header_bg').css('background', '#ffffff');
    		} else {
    			$('.av-section-bottom-logo').prependTo('#main');
    			$('.header_bg').css('background', 'transparent');
    		}
    
    	}
    
    	function gh() {
    		var st = $(window).scrollTop();
    		if( st >= 99 ) {
    			$('.av-section-bottom-logo').insertAfter('#header_main');
    			$('.header_bg').css('background', 'transparent');
    		}
    	}
    
    	gh();
    
    	$(window).scroll(function() {
    		g();
    	});
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');

    Remove browser cache or hard refresh before checking the page.

    Best regards,
    Ismael

    #661939

    Hi Ismael,

    I figured it out, on a different way. Thanks for the hints ;-)
    Best regards, Annelies

    #662139

    Hi,

    glad you figured it out. Let us know in a new ticket if you have some more questions related to the theme. We are happy to assist you.

    Best regards,
    Andy

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Logo below menu styling question’ is closed to new replies.