Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('document').ready(function(e) {
- $(window).scroll(function() {
- if($(this).scrollTop() > 200) {
- $('.back-to-top').fadeIn();
- } else {
- $('.back-to-top').fadeOut();
- }
- });
- $('.back-to-top').click(function() {
- $('body,html').animate({scrollTop:0},1500);});
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement