我想在我的平滑滚动代码中添加缓动样式,但每当我这样做时,它都会在控制台中引发持续增加的jquery错误。在转换时添加缓动抛出jquery错误
$('#slider-scrollDown').click(function() {
$('html, body').animate({
scrollTop: $("#scrollTo-container").offset().top
}, 2000);
});
这是我应得的,我尝试添加像这样的宽松政策:
$('#slider-scrollDown').click(function() {
$('html, body').animate({
scrollTop: $("#scrollTo-container").offset().top
}, 2000, 'easeInOut');
});
的错误,我收到的控制台是:
Uncaught TypeError: n.easing[this.easing] is not a function
该款显示器一次,然后在下面的另一个红色增加的数字,它不停止。
删除时间延迟和写easeInOutCubic –
好吧,但这不是真的那种宽松我想用... – Lee
请检查此答案http://stackoverflow.com/questions/12592279/typeerror-p-easingthis- easing-is-not-a-function –