Tagged: x
-
AuthorPosts
-
June 2, 2016 at 12:56 am #1021534
Hello,
Is it possible to use one logo (pineapple3 attached) for stacked when landing on the page and then have it change to another once scrolling begins (logo4 attached)?’
Thanks,
ChuckJune 2, 2016 at 4:28 am #1021794Hello Chuck,
Thanks for posting in. Yes that is possible.
1.) On Appearance > Customize > Header > Logo and Navigation > Layout: Choose Stacked.
2.)On Appearance > Customize > Header > Logo : Upload the pineapple3 logo.
3. Add the following code on Appearance > Customize > Custom > Edit Global Javascript:jQuery(document).ready(function($) { var $masthead = $('.masthead'); var $logo = $('.x-brand'); var $logoSrc = $logo.find('img').attr('src'); var $navbar = $('.x-navbar'); var $navBtn = $('.x-btn-navbar'); var $logoBar = $('.x-logobar-inner > .x-container'); var $alt_logo = 'ADD_LOGO4_URL HERE'; function navStackToInline( $alt_logo ) { if ( $navbar.hasClass('x-navbar-fixed-top') ) { $masthead.removeClass('masthead-stacked'); $masthead.addClass('masthead-inline'); $logo.insertBefore($navBtn); if ( $alt_logo ) { $logo.find('img').attr('src', $alt_logo) } } else { $masthead.removeClass('masthead-inline'); $masthead.addClass('masthead-stacked'); $logo.appendTo($logoBar).show(); $logoBar.animate({height:$logo.outerHeight()}); if ( $alt_logo ) { $logo.find('img').attr('src', $logoSrc); } } } navStackToInline(); $(window).ready(navStackToInline($alt_logo)).scroll(function() { navStackToInline($alt_logo); }); var $window = $(window); var windowsize = $window.width(); if (windowsize < 767) { $(".x-btn-navbar").appendTo(".x-topbar"); } });
Then from above code update this part: var $alt_logo = ‘ADD_LOGO4_URL HERE’;
Hope this helps.
June 2, 2016 at 11:15 am #1022467We’re getting somewhere…
How would I go about editing the CSS of the logo to align with the rest of the Nav Bar?June 2, 2016 at 11:23 am #1022483Not to go off topic, but I can’t get the essential grid to load on the website?
http://www.ciccaronerealestate.com/June 2, 2016 at 11:32 am #1022496In regards to the new logo setup, the page “bounces” from time to time. It’ll scroll the inline menu over the pineapple logo at the top.
June 2, 2016 at 2:21 pm #1022818Hi there,
To align the logo to the nav bar, please find this code:
.x-brand img { width: 200px; }
and update it to:
.x-brand img { width: 200px; margin-top: 15px; }
Would you mind pointing out which section the Essential Grid is not loading? I could see an Essential Grid added under Properties section and it seems to be displaying correctly.
June 9, 2016 at 11:52 am #1034307Went with a Hero image instead. Much cleaner result
"jQuery('<img src="http://domain.com/hero-image.png" />').insertBefore('.masthead');"
June 9, 2016 at 3:05 pm #1034594Great to see you found a solution.
Let us know if you need help with anything else.
Thanks
Joao
-
AuthorPosts