jQuery AnimateTo Plugin - $.animateto (identifier, speed, easing, callback);
/*!
* jQuery AnimateTo Plugin
*
* Copyright 2012, Mirco Babini
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/GPL-2.0
*/
(function($) {
$.animateto = function (identifier, speed, easing, callback, offset) {
if (offset === undefined) offset = 0;
return $('html,body').animate ({ scrollTop: $(identifier).offset ().top }, speed, easing, callback);
};
})(jQuery);