I have integrated with success Infinite Scroll on my Joomla Project. The pagination in Joomla is
<a class="page-link-2 " href="/index.php/en/sale-luxury-properties/regid/13?searchitem=1&start=12" title="2">2</a>
<a class="page-link-3 " href="/index.php/en/sale-luxury-properties/regid/13?searchitem=1&start=24" title="3">3</a>
<a class="page-link-4 " href="/index.php/en/sale-luxury-properties/regid/13?searchitem=1&start=36" title="4">4</a>
<a class="page-link-<i class='fa fa-chevron-right'></i> next" href="/index.php/en/sale-luxury-properties/regid/13?searchitem=1&start=12" title="<i class='fa fa-chevron-right'></i>"><i class="fa fa-chevron-right"></i></a>
I use Jquery to init. and my jquery code is
$('.view-properties').infiniteScroll({
// options
path: function() {
var pageNumber = this.loadCount + 1;
return 'a.page-link-' + pageNumber;
},
append: '.view-properties .row ',
history: true,
loadOnScroll: true,
// load pages on button click
checkLastPage: true,
// disable loading on scroll
});
Using the "page-link" as class won't help because it will keep render the same objects over and over again. Can you please guide to what can i do ?