Skip to content

Instantly share code, notes, and snippets.

@zearadoua

zearadoua/js

Created Oct 18, 2017
Embed
What would you like to do?
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