Skip to content

Instantly share code, notes, and snippets.

@zearadoua
Created October 18, 2017 10:04
Show Gist options
  • Save zearadoua/ff827c61eb8f03e2b3ec5705be8cb7d5 to your computer and use it in GitHub Desktop.
Save zearadoua/ff827c61eb8f03e2b3ec5705be8cb7d5 to your computer and use it in GitHub Desktop.
show and hide go-top button
$(window).scroll(function () {
if ($(this).scrollTop() > 200) {
$('.go-top').fadeIn(200);
} else {
$('.go-top').fadeOut(200);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment