1

I'm using the Infinite Scroll plugin from https://github.com/paulirish/infinite-scroll. The documentation is unfortunately a little lacking. I've got this partly working, but I'm finding that the script is only firing on the first page. The site I've got this on is an ASP.NET MVC 5 site, with a table using the PagedList plugin from nuget. The URL structure is /Claim?page=. By going to /Claim, or /Claim?page=1, and scrolling down, the infinite scrolling works without issue. If I navigate to /Claim?page=2, infinite scrolling doesn't work, and navigation elements aren't hidden.

A similar problem is described in this question: Infinite Scroll functions only in the front page

I've added the following to pathParse, but it hasn't helped.

pathParse: function () { return ["/Claim?page=", ""] },

Here's the relevant code:

$('#listAll').infinitescroll({
    navSelector: "ul.pagination",
    nextSelector: "li.PagedList-skipToNext a",
    itemSelector: "#listAll tr",
},
function (arrayOfNewElems)
{
    removeNoJS();
    UpdateURL(arrayOfNewElems);
});

Everything else is just left at default. Is anyone able to point out what I'm doing wrong here? I've been working on it for quite some time but have been stalled, so I would really appreciate any help.

My end goal is to be able to go to a url, maybe page 2, and be able to scroll down or up from there. That will take further modifications, but this issue is posing a big hurdle!

Let me know if I need to provide more details.

Cheers!

Community
  • 1
  • 1
Tarki B
  • 11
  • 3

0 Answers0