1.0.3 • Published 4 years ago

vgloadmore v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

vegasLoadMore

Loading content without reloading the page

npm npm

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