https://github.com/tomashubelbauer/js-infinite-scroll
Bidirectional infinite scroll with configurable amount of maximum displayed and newly added items
https://github.com/tomashubelbauer/js-infinite-scroll
infinite-lists infinite-scroll infinite-scroll-plugin infinitescroll javascript
Last synced: 11 months ago
JSON representation
Bidirectional infinite scroll with configurable amount of maximum displayed and newly added items
- Host: GitHub
- URL: https://github.com/tomashubelbauer/js-infinite-scroll
- Owner: TomasHubelbauer
- Created: 2018-01-04T20:48:41.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2022-04-14T20:29:16.000Z (about 4 years ago)
- Last Synced: 2025-06-01T16:41:33.713Z (about 1 year ago)
- Topics: infinite-lists, infinite-scroll, infinite-scroll-plugin, infinitescroll, javascript
- Language: JavaScript
- Homepage: https://tomashubelbauer.github.io/js-infinite-scroll
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Infinite Bidirectional Capped Scroll
[**LIVE**](https://tomashubelbauer.github.io/infinite-bidirectional-capped-scroll)
An example of infinite scroll that loads new items on both hitting the bottom and the top of the page
and trims the total amount of items so that a maximum number of items in the page is capped.
## To-Do
### Achieve smooth scroll on the horizontal axis as well
### Fix behavior on Windows Firefox where scrolling to the causes oscilation
### Try to preserve the scroll momentum when using the touchpad
On macOS Firefox, when flicking the touchpad to give the scroll a significant
momentum, the scrollbar reaches the bottom of the page and gets stopped abruptly
which does not preserve its momentum. Instead, we could try detecting the speed
of scrolling soon and adjust the mounted content accordingly so that it grows
fast enough to drain the momentum of the scroll without reaching the end of the
page before more content is loaded.
### Package up as an ESM library and add depending instructions to the readme
Host using GitHub Pages to get a URL with the correct MIME.