Skip to content

Instantly share code, notes, and snippets.

@ibrahimkholil
Last active October 10, 2018 13:16
Show Gist options
  • Save ibrahimkholil/4229297bb8e762b310a251d549dcb963 to your computer and use it in GitHub Desktop.
Save ibrahimkholil/4229297bb8e762b310a251d549dcb963 to your computer and use it in GitHub Desktop.
sticky nav scoll down
/**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