Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chemzqm/fast-scroll
Make the infinite scroll view in webview faster
https://github.com/chemzqm/fast-scroll
Last synced: about 1 month ago
JSON representation
Make the infinite scroll view in webview faster
- Host: GitHub
- URL: https://github.com/chemzqm/fast-scroll
- Owner: chemzqm
- Created: 2014-04-23T11:53:16.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-04-29T05:51:13.000Z (over 10 years ago)
- Last Synced: 2024-10-29T10:44:55.388Z (about 2 months ago)
- Language: JavaScript
- Size: 203 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Fast-scroll
A component used for performance improved infinite scroll on mobile device.
Showcase at .
**Note** try not use infinite scroll in your app, that's terrible user experience.
~~TODO: improve performance by create dom with iframe ~~ badly performance on safari, not consider any more.
## Installation
Install with [component(1)](http://component.io):
$ component install chemzqm/fast-scroll
## API
```js
var faster = require('fast-scroll');
faster(el, {
offsetTop: 500,
osffsetBottom: 500,
throttle: 300
})
```### fast-scroll(el, [option])
bind fast-scoll to scrolling `el` with optional option.
* `option.offsetTop` <800> max top offset of the children element.
* `option.offsetBottom` <800> max bottom offset of the children element.
* `options.throttle` <400> throttle the check in throttle millisecond.### .reset()
Back to initial state. call this when you rerender the items of the scrolling element.
## License
MIT