Last active
March 15, 2019 19:37
-
-
Save jentheo/231b510bd0be7ded0d5e4aa76ff570ed to your computer and use it in GitHub Desktop.
Fix issue with et-fixed-header not being applied on single event pages in Divi
This file contains hidden or 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
<script> | |
(function($) { | |
$(window).scroll(function() { | |
var scroll = $(window).scrollTop(); | |
if (scroll >= 100) { | |
//clearHeader, not clearheader - caps H | |
$("#main-header").addClass("et-fixed-header"); | |
} | |
}); | |
$(window).scroll(function() { | |
var scroll = $(window).scrollTop(); | |
if (scroll < 100) { | |
//clearHeader, not clearheader - caps H | |
$("#main-header").removeClass("et-fixed-header"); | |
} | |
}); | |
})( jQuery );</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment