Trying to get jscroll response in callback function, looking for url received in response, so that it can be updated on scrolling and get page view.
<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);
}