Last active
July 9, 2018 21:59
-
-
Save kary4/605e894e9096a682dc223e01fe6b4aee to your computer and use it in GitHub Desktop.
Fixed Header Effect Animation
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
<script> | |
jQuery( document ).ready(function() { | |
jQuery(window).scroll(function(){ | |
if (jQuery(this).scrollTop() > 5) { | |
jQuery('#main-header').addClass('et-fixed-header'); | |
} else { | |
jQuery('#main-header').removeClass('et-fixed-header'); | |
} | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment