README
vegasLoadMore
Loading content without reloading the page
Install
npm i vgloadmore
or download here
Dependencies
- jQuery >= 3
Usage
$('.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 Russia
License
Is published under the MIT license