由网友(在眼泪中学会了坚强)分享简介:可能重复: How我做停止的网页,滚动到触发JavaScript的一个链接被点击顶部? 我的浏览器滚动到顶部AJAX请求后,然后我用my browser scrolls to top after ajax request then i use $('html, body').animate({ scrollTop...
可能重复: How我做停止的网页,滚动到触发JavaScript的一个链接被点击顶部?
我的浏览器滚动到顶部AJAX请求后,然后我用
my browser scrolls to top after ajax request then i use
$('html, body').animate({ scrollTop: $('#loadMore').offset().top }, 2000);
滚动回到我的股利。 有没有一种方法,我从一开始
to scroll back to my div. is there a way i stop it from scrolling to top from the beginning
推荐答案
您应该添加返回false
您的Ajax调用函数的末尾。或您的在线通话结束:
you should add return false
to the end of your ajax call function. Or to the end of your inline call:
<a href="#" onclick="someAjaxCall(); return false">Link</a>
相关推荐
最新文章