每次用户接近文档顶部时,我都会try 向下滚动100px.
I have the function executing when the user gets close to the top of the document, but the .scrollTo function isn't working.
我在前后都发出了一个alert ,判断是否是这条线阻止了它,只有第一个alert 发出,下面是代码:
alert("starting");
$.scrollTo({ top: '+=100px', left: '+=0px' }, 800);
alert("finished");
我知道我已经正确链接了jQuery页面,因为我从头到尾都在使用许多其他jQuery函数,它们都工作得很好.我也试过把上面的"PX"go 掉,但似乎没有什么不同.