Last active
February 4, 2021 12:51
-
-
Save aislam23/59b6bca4f32f020322147c7bdc444440 to your computer and use it in GitHub Desktop.
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 type="text/javascript"> | |
$(function() { | |
$(window).scroll(function() { | |
if($(this).scrollTop() != 0) { | |
$('.totop').fadeIn(); | |
} | |
else { | |
$('.totop').fadeOut(); | |
} | |
}); | |
$('.totop').click(function() { | |
$('body,html').animate({scrollTop:0},800); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment