试图在回调函数中获取 jscroll 响应,寻找响应中收到的 url,以便它可以在滚动时更新并获取页面视图。
<script type="text/javascript">
$('.next-btncall').jscroll({
debug: false,
autoTrigger: true,
autoTriggerUntil: false,
loadingHtml: '<img src="/static/images/loading.svg" alt="Loading" /> Loading...',
loadingFunction: false,
padding: 20,
nextSelector: 'a.jscroll-next:last',
contentSelector: '.endless-col',
pagingSelector: '',
callback: urlUpdate(data)
});
function urlUpdate(contentSelector) {
console.log('responose of ajax');
window.history.pushState(null, null, url);
}