Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vegas-dev/vegasloadmore
Loading content without reloading the page
https://github.com/vegas-dev/vegasloadmore
Last synced: 22 days ago
JSON representation
Loading content without reloading the page
- Host: GitHub
- URL: https://github.com/vegas-dev/vegasloadmore
- Owner: vegas-dev
- Created: 2018-12-01T16:43:34.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-27T11:55:55.000Z (over 4 years ago)
- Last Synced: 2024-06-02T15:10:11.117Z (7 months ago)
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vegasLoadMore
Loading content without reloading the page[![npm](https://img.shields.io/npm/v/vgloadmore.svg?style=flat-square&maxAge=600)](https://www.npmjs.com/package/vgloadmore) [![npm](https://img.shields.io/npm/l/vgloadmore.svg?style=flat-square)]()
## Install
```
npm i vgloadmore
```or download [here](https://github.com/vegas-dev/vegasLoadMore/archive/master.zip)
## Dependencies
* jQuery >= 3## Usage
```js
$('.btn-load-more').vegasLoadMore({
limit: 50,
offset: 50,
route: 'https://url.site/get/load/content',
params: {
var1: 'any variable',
var2: 'any variable',
},
onLoad: function($self, data) {
var target = $self.attr('data-target');
$(target).append(data.view); // Here is the generated view that is transferred from the server.
},
onClick: function($self) {
// Button actions after clicking
}
});
```## Authors
[VEGAS STUDIO](https://vegas-dev.com) Russia## License
Is published under the [MIT license](http://www.opensource.org/licenses/mit-license)