I'm using the following jQuery InfiniteScroll plugin which actually works but keeps loading the last page over and over, it can't be stopped. Here's the code which I use:
$('#catalog').infinitescroll({
navSelector : "div.page-nav:last",
// selector for the paged navigation (it will be hidden)
nextSelector : "div.page-nav a.navnext:last",
// selector for the NEXT link (to page 2)
itemSelector : "#catalog div.single",
// selector for all items you'll retrieve
bufferPx : 400
});
And my pagination looks like the following:
<div id="page-nav" class="page-nav">
<div class="top">
<a id="page-1" class="active">1</a>
<a id="page-2" href="?page=2">2</a>
<a id="page-3" href="?page=3">3</a>
<a id="page-4" href="?page=4">4</a>
<a id="page-5" href="?page=5">5</a>
<a id="page-6" href="?page=6">6</a>
<a id="page-7" href="?page=7">7</a>
</div>
<div class="bottom">
<span class="right">
<a class="navnext" href="?page=2" id="next-2">Next</a>
<span class="next">Ctrl</span>
</span>
</div>
</div>
Could anybody help me with this, please?
Thank you.