metafizzy / metafizzy/infinite-scroll

Next link not found on last page error

Open
#730 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
7.5k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

While i use infinity scroll, i want to see Page number.
`page=1` , `page=2` and so on..

Thats why i removed history option:

$grid.infiniteScroll({
path: '.pagination__next',
append: '.blog_item',
prefill: false,
loadOnScroll: false,
button: '.load_more',
outlayer: iso,
status: '.scroller-status',
hideNav: '.pagination',
/*history: true,*/
});

But if i refresh last page, i get error:
Bad InfiniteScroll path option. Next link not found: .pagination__next

How i can remove this error?
Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the error with the shown $grid.infiniteScroll configuration after refreshing the last page, focusing on the path option and the missing .pagination__next link. The fix is done when reaching or refreshing the last page no longer raises the “Next link not found” error while page loading still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery
Domain
frontend, web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.