滚动时静默加载新 URL
Silent load of new URL on scroll
我一直看到这种页面在您滚动时静默加载的趋势。例如:
http://www.adweek.com/brand-marketing/as-soda-consumption-declines-heres-how-coca-cola-is-reshaping-itself/
滚动浏览文章后,会载入一篇新文章,URL 会发生变化。
挖掘源代码,但找不到任何东西。有什么想法吗?
是的,这些实现会寻找用户的滚动并通过 ajax 加载新内容。
$(window).scroll(function() {
if($(window).scrollTop() == $(document).height() - $(window).height()) {
// ajax call get data from server and append to the div
// change url
}
});
看这里:jQuery load more data on scroll
我一直看到这种页面在您滚动时静默加载的趋势。例如: http://www.adweek.com/brand-marketing/as-soda-consumption-declines-heres-how-coca-cola-is-reshaping-itself/
滚动浏览文章后,会载入一篇新文章,URL 会发生变化。
挖掘源代码,但找不到任何东西。有什么想法吗?
是的,这些实现会寻找用户的滚动并通过 ajax 加载新内容。
$(window).scroll(function() {
if($(window).scrollTop() == $(document).height() - $(window).height()) {
// ajax call get data from server and append to the div
// change url
}
});
看这里:jQuery load more data on scroll