webcreate/infinite-ajax-scroll
The issue has been closed
Infinite scroll in tab navigation problem #354
DariuszPowroznik posted onGitHub
Hi, I'm trying to use your infinite-ajax-scroll (v3) on page where I have tab navigation (from Bootstrap v4). In one tab I have articles and in second I have products. In both I wanted to have infinity scroll working independent.
I was trying to working with bind/unbind but it's not working. This is how I tried to use it:
var art = new InfiniteAjaxScroll('#Articles', {
item: '.Article',
next: '.nextArt',
pagination: '#ArticlePagination',
spinner: '.Artspinner'
});
var prod = new InfiniteAjaxScroll('#Products', {
item: '.InfiniteProduct',
next: '.nextProduct',
pagination: '#ProductPagination',
spinner: '.Prodspinner',
bind: false
});
$('#tab-newsSearch').on('click', function (e) {
e.preventDefault();
prod.unbind();
setTimeout(function () { art.bind(); }, 100);
})
$('#tab-productsSearch').on('click', function (e) {
e.preventDefault();
art.unbind();
setTimeout(function () { prod.bind(); }, 100);
})
Is there any posibility yo use it that way?