0

试图在回调函数中获取 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);

}

4

1 回答 1

0

尝试这个

$('.next-btncall').jscroll({ contentSelector: '.endless-col', callback: function(data) { window.history.pushState(null, null, data.replace(' .endless-col', '')); } });

于 2017-09-17T10:04:16.500 回答