Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(window).scroll(function() {
- if ($(this).scrollTop()) {
- $('#toTop').fadeIn();
- } else {
- $('#toTop').fadeOut();
- }
- });
- // Event Click
- $("#toTop").click(function() {
- $("html, body").animate({scrollTop: 0}, 1000);
- });
Add Comment
Please, Sign In to add comment