aboutsummaryrefslogtreecommitdiff
path: root/static/scroll.js
blob: 1180588a86a0402ff1dfaf275aa6e34bbcf0cb87 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
$(window).scroll(function() {
    if ($(this).scrollTop() >= 50) {
        $('#jump-top').fadeIn(200);
    } else {
        $('#jump-top').fadeOut(200);
    }
});
$('#jump-top').click(function() {
    $('html').animate({
        scrollTop : 0
    }, 500);
});