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
0
votes
0 answers

Ajax infinite scroll not working with laravel table

I want to display a table in a page with laravel and I want to add infinite scroll to load more rows after scrolling. I am using ajax to do that but it doesn't seem to be working and no errors appear in the console. This is my controller…
memeister
  • 53
  • 5
0
votes
0 answers

Infinite Scroll stopped loading the first instance

I had an infinite scroll page on my website. It was working just fine but now, I see that it doesn't load the first instance immediately on the page load. But when scrolled down, appears and infinite scroll also works. I haven't imported anything…
0
votes
1 answer

Endless text scrolling?

There are lots of solutions for endless scrolling in recycler views, etc., but I haven't found anything that deals with endless scrolling of text. My use case is viewing an extremely long text (think several book's worth). I would like to allow…
Ted Hopp
  • 232,168
  • 48
  • 399
  • 521
0
votes
1 answer

How to handle click on details (and navigate back on list) with infinite list item?

I have an infinite scroll which displays items When I click on one item it opens the detail page When I go back to the infinite scroll/list page I need to go back to the item I just clicked on, not to the top How can I do that ? Few ideas: Should…
Adèle
  • 31
  • 3
0
votes
1 answer

EventListener in angular with Callback gives error in firefox ERROR ReferenceError: "event is not defined"

I want to load data on window scroll event this is my code: private scrollChangeCallback: () => void; ngOnInit() { this.scrollChangeCallback = () => this.handleWindowScroll(event); window.addEventListener('scroll',…
Palak Jadav
  • 1,202
  • 1
  • 11
  • 23
0
votes
1 answer

Creating custom jquery infinitive stroller, how to turn scroll on and off after sending request?

I want to be able to turn on $(document).on('scroll', function() {...}); when I turn it off using $(document).off('scroll'); My code so far I tried using debounce function, but I am getting Illegal invocation function scroller(lang, type, genre,…
Dimitar
  • 1,830
  • 5
  • 32
  • 52
0
votes
0 answers

lazy loading a tree and pagination at each node level - angular

Is there any componenets for angular which support lazy loading of tree, but also pagination as well at each node level? There are a few options…
josh_boaz
  • 1,963
  • 7
  • 32
  • 69
0
votes
1 answer

Turning Off Infinite Scroll

I'm working on: https://holisticharmonyinhc.com/ via Wordpress On the Single Post view, when you scroll all the way to the bottom, it automatically loads the next post (resulting in two full posts on the same page). I would like to turn off this…
Samantha
  • 43
  • 8
0
votes
0 answers

What is the best method to fetch more data based on event?

I have built an app that fetches a list of posts based on selected category. When the category changes I reset state and load a new set of posts based on the new category. I use componentDidMount() to call a fetch data function based on category and…
Rob
  • 1
0
votes
1 answer

Trying to make an infinite scroll with a list of div already in the html

I'm trying to write a function in jQuery that could create an infinite scroll with divs that are already in my page. I would like to make them appear and load randomly when you reached the end of the original content. The thing is that I'm just…
M1011
  • 3
  • 1
0
votes
2 answers

Is it possible to create a infinite scroll inside of a Semantic Form.Select

I'm working on a project where as form.select is used and I want to be able to pull more data when at the bottom of the list. Is there a way to do this? If so could you point me in the right direction. I have already tried the Visibility behavior…
Kegen Guyll
  • 13
  • 1
  • 5
0
votes
1 answer

unable to dequeue a cell with identifiermust register a nib or a class for the identifier or connect a prototype cell in a storyboard

I'm trying to add endless scrolling to my iOS app and I'm hitting a snag. I created a Loading cell for showing a spinner when the data is being fetched, I then assign it like so in my TableView Source object: public override UITableViewCell…
Eman
  • 1,093
  • 2
  • 26
  • 49
0
votes
2 answers

Is it possible to use django-tables 2 with infinte scroll?

I just started to write an application using Django 2 and the most recent version of django-tables2. So far everything works without any problems but now I have a question. I would like to display some data by using a sticky header and infinite…
0
votes
1 answer

How do I load only one ViewController at a time while paging in a UIScrollView

I am creating a paging UIScrollView which contains several pages. On each page is a UIViewController some of which are quite memory intensive and others which will be used multiple times and I hope to reuse. My first attempt was to create the…
0
votes
1 answer

How do I implement UIScrollView tiling with paging enabled?

I am trying to create an infinite scrolling paging UIScrollView I have been following the Advanced UIScrollView Techniques video from WWDC 2010 however I am unsure as to how to create tiling for a paging UIScrollView. I have been using this tutorial…
1 2 3
99
100