Skip to content

Instantly share code, notes, and snippets.

@Garconis
Last active June 4, 2018 10:54
Show Gist options
  • Save Garconis/288bb23aac8ea898f5d9b26b0f935f10 to your computer and use it in GitHub Desktop.
Save Garconis/288bb23aac8ea898f5d9b26b0f935f10 to your computer and use it in GitHub Desktop.
Divi | Swap/change the Divi header logo on fixed header (After Scroll)
(function($) {
$(window).on('scroll', function() {
if(jQuery('#main-header').hasClass("et-fixed-header")) {
jQuery('#logo').attr('src','/wp-content/uploads/logo-alt.png');
}
else {
jQuery('#logo').attr('src','/wp-content/uploads/logo.png');
}
});
})( jQuery );
@vinay7d
Copy link

vinay7d commented Jun 4, 2018

but if we use javascript, the problem is "during loading of the site the logo will be of divi"...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment