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.

1977 questions
0
votes
0 answers

How to make tableViewCell Vertical Paging like a carousel

Currently tableview cells look like this: current cell image When my app first opens it looks like the picture on the left and when I scroll one page down it looks like the picture on the right. However I want it to look like a carousel: like this I…
0
votes
2 answers

EventListener click function firing multiple times after initialize again during infinite scroll

This is my first question, so i try to describe it precisely as possible and follow the stackoverflow guideline "How do I ask a good question?" My Problem: Im using the "old but gold" infinite-scroll jQuery plugin to load the next posts on a…
0
votes
1 answer

Observable Array merge for Inifinite-scroll

In a Ionic2+Angular2+Meteor mobile app, contacts are listed with infinite-scrolling option. Contacts are supposed to be appended in the batch of 20 during scrolling. import {Observable} from "rxjs"; contacts: Observable; /*…
annadurai
  • 142
  • 1
  • 8
0
votes
1 answer

combine RxJs Observable array

I'm trying to do infinite-scroll in a Ionic2+Meteor mobile app which lists the contacts. In the following code, findContacts() function returns 10 contacts at a time. contacts: Observable; findContacts() :Observable { /*…
annadurai
  • 142
  • 1
  • 8
0
votes
1 answer

React - Infinite scrolling - child elemnts with dynamic heights

I'm using react-infinite from (https://github.com/seatgeek/react-infinite), to have data loading when user scrolls. The problem for me is that the child elements(inside the container), their height is dynamic. This is the struct of the…
omriman12
  • 1,439
  • 3
  • 23
  • 42
0
votes
1 answer

remove session variable on page refresh

I have an array of ids called $ids. I use infinite scrolling to display sets of those ids ($subset_ids) which I then put into a session variable. When I loop back through the request, I remove $subset_ids from $ids so as not to display any id…
ian
  • 283
  • 3
  • 10
0
votes
1 answer

Kendo Grid Infinite Scrolling Not Requesting With Correct ParameterMap (Page, Skip)?

I'm currently trying the kendo grid virtualization/infinite scrolling on my project but i cannot make it working properly(it does work but incorrect behavior). The problem i encounter is that the request to the backend service especially the…
himawan_r
  • 1,720
  • 1
  • 13
  • 20
0
votes
1 answer

Infinite scroll js: locally hosted loading gif

Working on a project using the infinite scroll javascript library. I'm trying to use a gif I have downloaded as the loading image when the infinite scroll library is making its ajax call to the server. However no matter how I do the image routing it…
SomeSchmo
  • 655
  • 3
  • 17
0
votes
0 answers

jQuery infinite scroll and tumblr

I'm pretty new to tumblr so I've just been playing with the 'themes' currently I'm trying to introduce an infinite scroll. Here is the resources that I am using: Demo Tumblr: http://testingthemedes.tumblr.com/ Infinite Scroll.js:…
John107
  • 1,427
  • 2
  • 10
  • 28
0
votes
1 answer

React Virtualized: Collection with cells that have the same fixed height but different widths

I'm a little confused if I can use React Virtualized's Collection component to solve my problem. I'll try to describe what I'm doing: I'm using React Virtualized on a page to display two lists/collections of items. I've finished the first collection…
Jooooooooohn
  • 115
  • 1
  • 3
  • 11
0
votes
1 answer

Collapsible group headers using md-virtual-repeat and md-virtual-repeat-container

I am trying to implement display collapsible groupings as a proof of concept using md-virtual-repeat and I am having problems to set height based on the inner content as with virtual-repeat items. I have created codepen example to illustrate the…
Prashanth
  • 107
  • 1
  • 12
0
votes
0 answers

Implementing Infinite Scroll in Ionic 2

I am trying to implement the Infinite Scroll functionality in Ionic 2 but the function (which should get called up on onInfinite) is not getting called. Here I am not able to get even the statement console.log('Begin async operation'); called, which…
0
votes
2 answers

Ionic 2 - Filter search in infinite scroll

I am using PouchDB for database and I'm already implement infinite scroll in my project. For the first load, only 40 document will be display and for next scroll, it will load 40 more document. The total document in my database is about 3000…
Akmal
  • 123
  • 1
  • 15
0
votes
1 answer

jQuery infinite scroll firing multiple ajax requests

I added some infinite scrolling from this tutorial and i've been stuck on ajax request. it's always requesting multiple times. and this is my code : $(document).ready(function() { var win = $(window); var page = 1; var req = null; …
0
votes
2 answers

webpack must be known

I am trying to use ion infinite scroll directive above is the link which is similar to the functionality for what i need to do