scrollTo function jQuery is not working

 $("#your-div")[0].scrollTo(0, Number.MAX_SAFE_INTEGER);

Try this

$("#clickme").click(function() {
    $('html, body').animate({
        scrollTop: $("#wrap2").offset().top
    }, 2000);
    return false;
});

FIDDLE


/*
* ScrollToElement 1.0
* Copyright (c) 2009 Lauri Huovila, Neovica Oy
*  [email protected]
*  http://www.neovica.fi
*  
* Dual licensed under the MIT and GPL licenses.
*/

(function($) {
    $.scrollToElement = function($element, speed) {

        speed = speed || 750;

        $("html, body").animate({
            scrollTop: $element.offset().top,
            scrollLeft: $element.offset().left
        }, speed);
        return $element;
    };

    $.fn.scrollTo = function(speed) {
        speed = speed || "normal";
        return $.scrollToElement(this, speed);
    };
})(jQuery);