Questions tagged [infinite-scroll]

Infinite Scrolling, also known as endless scrolling, is a technique that is widely used by websites and Web applications that host lots of content on a page where pagination would traditionally have been used. Infinite scrolling involves initially loading only one page of content. As the user scrolls down, the browser fetches another page via an AJAX request. There are several Infinite Scrolling plugins that facilitate this technique in modern browsers.

Background:

In Web 1.0 applications, it is common to see pagination used to limit the browser from displaying all of the data in a set all at once. Pagination allows a subset of the data to be displayed on the page, which reduces the memory footprint and decreases the lag-time caused by too much visible markup being displayed in the DOM.

Pagination involves "next" and "prev" links as controls in which a user uses to traverse through the data. This technique is facilitated through either full page reloads, where clicking next reloads the page with the next data subset, or it's facilitated through AJAX, where the application replaces a portion of the page with the next set of data.

Some Infinite Scrolling plugins, such as the Infinite Scrolling - A jQuery Plugin simply extend this type of pagination by hiding the "prev" and "next" hyperlinks and automating the click through process by monitoring the scrollTop position, while others do not.

Thus, for websites and web applications with an existing legacy pagination technique, a plugin that extends existing functionality may be more desirable.

Example of the Infinite Scrolling Technique:

An real-life example of the infinite scrolling technique is found here

Infinite scrolling plugins:

Below is a list of some widely known Infinite Scrolling plugins:

When should I use this tag?

You should use the [infinite-scroll] tag on questions where you know or reasonably believe through trial and error that the problem you're facing is related to an infinite scroll plugin or an infinite scroll technique.

For example, this question is asked by a user who was having problems getting the jQuery Infinite Scroll plugin to work. The error the user is seeing only appears when the plugin is loaded, which implies that the plugin is involved in the problem.

It's not helpful to tag a question with a tag that isn't specifically involved in the problem, so an example of a situation where I wouldn't use the tag would be if the Infinite Scroll plugin or technique was working great, yet I had problems making an AJAX call to the server. Additionally, the problem occurs with or without the plugin; therefore, I would not use that tag in this specific scenario.

Advanced Techniques:

The majority of the Infinite Scroll plugins that exist, in general, only offer one way scrolling functionality. In other words, as the user scrolls down, more content is added. However, in most cases, the content above the visible viewing area remains actively loaded in the DOM.

As users scroll down long enough, they may begin to experience a lag as more and more memory is consumed by the browser. With enough content, this could theoretically cause a browser crash.

Ben Nadel writes a blog post covering Bidirectional Infinite Scroll. While there is no demo, in the blog post, he includes a video that demonstrates the technique.

For Bidirectional Scroll, there exists no plug-in at this time, at least none that are easy to find. The bidirectional technique is much harder to implement than the one-way technique.

The difficulty comes not from implementing two directions per se, but instead the difficulty manifests itself when attempting to implement scrolling that loads content above the visible area, such as when the user scrolls up. When scrolling down, new content added to the page does not affect the visible viewing area. While users may see the scrollbar move, the content itself is not affected.

But when content is loaded on top, the visible scroll area shifts, and the user experiences a jarring effect. Ben Nadel's technique involves storing the scrollTop position prior to loading in new content on top, and then once the content loads, a new scrollTop is quickly calculated before the user experiences any side effects.

2222 questions
7
votes
4 answers

CasperJS can not trigger twitter infinite scroll

I am trying to get some information from twitter using CasperJS. And I'm stuck with infinite scroll. The thing is that even using jquery to scroll the page down nothings seems to work. Neither scrolling, neither triggering the exact event on window…
finder_sl
  • 307
  • 4
  • 13
7
votes
3 answers

Modify WordPress Jetpack Plugin To Use 'Class' Instead Of An 'ID' Attribute

What I am trying to achive: Enable seamless & simultaneous infinite scrolling for multiple columns on the same page, each of which is pulling in a different set of content i.e. one column shows the latest posts, while the other shows the latest…
its_me
  • 10,998
  • 25
  • 82
  • 130
6
votes
1 answer

Infinite scroll and the callback

Apologies if this conflicts with a previous post of mine, but I am pretty stuck with the whole callback function of infinite scroll that hopefully someone can help me out. I'm using the Portfolio Slideshow Pro…
John the Painter
  • 2,495
  • 8
  • 59
  • 101
6
votes
3 answers

preventing duplicates infinite scrolling ajax loader

it might just be too late at night for me to see a clear solution here, but I figured I'd get some thoughts from anybody with an opinion... the site i'm working on has a long list of user posts. i've got all the scroll event handlers working to ajax…
overeasy
  • 404
  • 5
  • 12
6
votes
2 answers

Split column (50% each) scrolling in the opposite direction - continuous/loop

EDIT On closer inspection this is pretty broken when resizing the viewport. It stops working or on narrow windows and the scroll is super super fast. So I'm putting it up for bounty! -- I've seen something similar and have been trying to refactor…
user1406440
  • 1,329
  • 2
  • 24
  • 59
6
votes
1 answer

How react Infinite Queries support with offset and limit

I tried to implement an infinite scroll with my react.js project using Infinite Queries in react-query and react-virtual. But Infinite query is supporting with the cursor and the page. and my API is not supported for pages, and it has a limit,…
Pubudu Jayasanka
  • 1,294
  • 4
  • 18
  • 34
6
votes
1 answer

How to create a vertical scroll bar with transform:translateY() "AngularJS"?

I am using Infinite Scroll in my application, and I want to achieve a bidirectional scrolling effect which is not supported currently in the directive. I added the scroll detect method which finds upward/downward movement of scrolling and so I am…
Kunal Vashist
  • 2,380
  • 6
  • 30
  • 59
6
votes
1 answer

React infinite scroll- double scrollbars showing- I only want the window scroll bar

Im trying to implement infinite scroll for React.js. Everything works fine, except I want to be able to use the window scrollbar, to activate the infinite scroll. The code at the moment, has 2 scrollbars( I only want one). The code is from…
born2gamble
  • 197
  • 7
  • 17
6
votes
2 answers

How to use infinite scrolling recyclerview inside nestedscrollview?

The height of the screen is not enough because there are many items containing two recyclerviews on one screen. So I tried to have a child view in a nestedscrollview. however, all the items are loaded at once, or recyclers are not recycled. So I…
6
votes
1 answer

infinite Scroll with Magnific Popup callback

I'm using Infinite scroll and Magnific Popup. The popup works on the content which is 'page 1' but fails after that. I've attempted to use a callback for MagnificPopup within the infiniteScroll call. $grid.infiniteScroll({ path:…
sarah3585
  • 637
  • 13
  • 37
6
votes
3 answers

Vue Infinite Loading multiple request issue when page loads

I'm currently using Vue Infinite Loading on my Laravel App to display data, the problem I'm facing is that by when page loads it request all data even if I dont make a page scroll. From what I've understand it should only make request when my…
PenAndPapers
  • 2,018
  • 9
  • 31
  • 59
6
votes
2 answers

Laravel 5 Paginate + Infinite Scroll jQuery

I am trying to use paginate() to achieve infinite scroll. I think the easiest way is using the 'infinite-scroll' to achieve this. If you have any other suggestion how to do it without infinite-scroll library, just using jQuery, I'd be happy to…
senty
  • 12,385
  • 28
  • 130
  • 260
6
votes
1 answer

Infinite Scroll jQuery & Laravel 5 Paginate

I am successfully returning the data from Controller public function index() { $posts = Post::with('status' == 'verified) ->paginate(30); return view ('show')->with(compact('posts')); } Also, I am successfully…
senty
  • 12,385
  • 28
  • 130
  • 260
6
votes
1 answer

How to use page scroll on ngGridEventScroll?

Using ngGrid v2.X, I'm trying to devolop a grid that loads more data when page scroll (not grid scroll) goes bottom. By searching for similar questions i've found a solution to my 1st problem: ngGrid must have dynamic height, so i've did this…
noneJavaScript
  • 835
  • 3
  • 21
  • 41
6
votes
2 answers

Building an infinitely scrollable calendar-like view in Android

This is not a code problem, I interpret the guidelines as that being OK. I've been researching a way of building an infinitely scrolling calendar-like view in Android, but I've reached an impasse. Right now my dilemma is that most of the similar…