jquery scroll to top convert to scroll to bottom

I copied this code from the internet and wanted the get a identical result, however I want it to scroll down insted. I have tried to convert it as best I could, but I could not get it to work your help will be greatly appreciated.

$(document).ready(function(){

    // hide #back-top first
    $("#back-top").hide();

    // fade in #back-top
    $(function () {
        $(window).scroll(function () {
            if ($(this).scrollTop() > 100) {
                $('#back-top').fadeIn();
            } else {
                $('#back-top').fadeOut();
            }
        });

        // scroll body to 0px on click
        $('#back-top a').click(function () {
            $('body,html').animate({
                scrollTop: 0
            }, 800);
            return false;
        });
    });

});

Answers


$('#go-down').click(function () {
   $("html, body").animate({ scrollTop: $(document).height() }, "slow");
        return false;
    });‚Äč

Update demo


Need Your Help

How do I know which script in running Chrome causes to open a new pop-up?

javascript html css google-chrome

I have installed an extension in Chrome which opens up a pop-up tab when I click anywhere on the page (even if there is no link). When I see the "sources" tab in the "Developer Tools", it has a lot...

How to access the disks mapped through RDP from a service?

windows rdp unc

RDP has this fantastic ability to let export disks from remote user's workstation to the RDP server. As far as I can tell, it is not just a windows explorer trick, but all kinds of programs can use...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.