Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kanety/jquery-simple-iscroll
https://github.com/kanety/jquery-simple-iscroll
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/kanety/jquery-simple-iscroll
- Owner: kanety
- License: mit
- Created: 2019-02-22T01:03:07.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-01-23T11:24:57.000Z (almost 4 years ago)
- Last Synced: 2024-12-08T18:04:12.573Z (about 1 month ago)
- Language: HTML
- Size: 20.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# jquery-simple-iscroll
A jquery plugin for infinite scroll.
## Dependencies
* jquery
## Installation
Install from npm:
$ npm install @kanety/jquery-simple-iscroll --save
## Usage
Build html as follows:
```html
```Then run:
```javascript
$('#container').simpleIscroll({
content: '#table tbody',
paging: '#paging',
next: 'a.next'
});
```### Options
Show loading contents:
```javascript
$('#container').simpleIscroll({
...
loading: '.loading'
});
```Set margin height to start loading before reaching at the bottom:
```javascript
$('#container').simpleIscroll({
...
margin: 10
});
```### Callbacks
```javascript
$('#container').simpleIscroll({
...
}).on('load:start', function(e, href) {
...
}).on('load:end', function(e, href) {
...
}).on('load:success', function(e, $content, $paging) {
...
}).on('load:failure', function(e, nextHref, xhr, status, error) {
...
});
```## License
The library is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).