jQuery Animated Scroll Up到达目的地后与你战斗

时间:2017-06-23 07:52:50

标签: jquery scrollto

我有这段代码可以顺利滚动到带有ID的标签。

$('html, body').animate({
    scrollTop: $($this.attr("href")).offset().top - (menuWrapper.height() + 25)
}, 750);

它有效,但是当它对位置作出反应并且你试图向上或向下滚动时,它会对你进行战斗直到达到750毫秒。

如何防止这种情况发生。

0 个答案:

没有答案