尝试在回调函数中获取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);
}
答案 0 :(得分:0)
试试这个
$('.next-btncall').jscroll({
contentSelector: '.endless-col',
callback: function(data) {
window.history.pushState(null, null, data.replace(' .endless-col', ''));
}
});