$(document).ready(function(){ $('.button').children().onclick(function(eventpage scroll
scrollTop: $(hash).offset().top
}, 1000,number of milliseconds it takes to scrol
我试图让我的按钮滚动到我想要的div,即使它不在同一页上。这就是我所拥有的: $("#smooth").click(function() { //#smooth is the id of my button scrollTop:$("#map").offset().top //#map - where i