Last active
June 4, 2018 10:54
-
-
Save Garconis/288bb23aac8ea898f5d9b26b0f935f10 to your computer and use it in GitHub Desktop.
Divi | Swap/change the Divi header logo on fixed header (After Scroll)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
but if we use javascript, the problem is "during loading of the site the logo will be of divi"...