metafizzy / infinite-scroll

📜 Automatically add next page
https://infinite-scroll.com
7.41k stars 1.74k forks source link

Infinite Scroll callback Isnt work #899

Closed PiklioBezGashti closed 3 years ago

PiklioBezGashti commented 4 years ago

Im using infinite scroll V2 with Swiper Slider and after infinite scroll load more content Swiper slider is not working on the new content i need to update Swiper after Infinite callback but the callback is not working for some reason even the console log text isnt append in console on callback Is it the right way to catch callback in V2 with using $container.on( 'load.infiniteScroll', function() ?

Infinite

` $("#listproduct").addClass("infinitescroll"); var $container = $('.infinitescroll');

$container.infinitescroll({ navSelector: ".pagination", nextSelector: ".next-pagination", itemSelector: ".product-layout", history: 'push', loading: { msgText: "Loading ....", } }, $container.on( 'load.infiniteScroll', function() { console.log('fine'); swiper.update(); });`

Swiper

$(".swiper-container").each(function(index, element) { var swiper = new Swiper('.swiper-container', { slidesPerView: 1, loop: true, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, pagination: { el: '.swiper-pagination' }, spaceBetween: 10, }); });

desandro commented 3 years ago

Infinite Scroll v2 is 5+ years old and no longer supported. Sorry, I will not be able to provide support here.