Skip to content

TheoryOfNekomata/jquery-eventinfinitescroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery Event Infinite Scroll

Event-driven infinite scroll plugin for jQuery.

Installation

Through NPM:

$ npm install --save jquery.eventinfinitescroll

Through Bower:

$ bower install --save jquery.eventinfinitescroll

Usage

    function addItemsToList(data) {
        // some function to add data to the list
    }

    $('.long-list').infiniteScroll({
        boundarySelector: '.long-list__see-more',
        request: function (){
            return $.getJSON('some/api/endpoint');
        }
    });

    // to bind the loading event
    
    $('.long-list')
        .on('infinitescroll', function (event, xhr) {
            xhr.done(addItemsToList);
        });
    

License

MIT. See LICENSE file for details.

About

Event-driven infinite scroll plugin for jQuery.

Resources

License

Stars

Watchers

Forks

Packages

No packages published