I’m using jscroll to load new pagination items dynamically:
require('jscroll');
$('ul.pagination').hide();
$('.infinite-scroll').jscroll({
autoTrigger: true,
padding: 0,
loadingHtml: '<i class="fas fa-spinner fa-spin text-secondary"></i>',
nextSelector: '.pagination li.active + li a',
contentSelector: 'div.infinite-scroll',
callback: function() {
$('ul.pagination').remove();
}
});
The problem is that wire:click
etc. on the content loaded via jscroll doesn’t fire. How do I get livewire to attach action listeners on the jscroll callback?