Last active
October 10, 2018 13:16
-
-
Save ibrahimkholil/4229297bb8e762b310a251d549dcb963 to your computer and use it in GitHub Desktop.
sticky nav scoll down
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
/**scrol down nav**/ | |
$(window).scroll(function() { | |
if ($(this).scrollTop() >= 200) { | |
$('.header').addClass('stickytop'); | |
} | |
else { | |
$('.header').removeClass('stickytop'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment