www.gusucode.com > 200套html5精品模板151_200 > 200套html5精品模板151_200/177/js/scrollToTop.js
$(document).ready(function() { $("a.back-to-top").click(function() { $("html, body").animate({ scrollTop: $($(this).attr("href")).offset().top + "px" }, { duration: 400, easing: "swing" }); return false; }); });