jquery - retour au début

Je vois ce violon échantillon ici

Je veux quand "vers le haut" apparaît, cliquez sur! défiler vers le haut en douceur ou lent

$(window).scroll(function() {
    if ($(this).scrollTop()) {
        $('#toTop').fadeIn();
    } else {
        $('#toTop').fadeOut();
    }
});

source d'informationauteur jhunlio