Skip to content

The old infinitescroll is no longer maintained. This is just a try .. for my own purposes.

License

Notifications You must be signed in to change notification settings

philippze/infinitescroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

News: I've released this project to the public domain. You can clone it and develop it further under your own authorship.

jquery infinitescroll

A demo page is currently here

Usage

<script src="<some_path>/jquery.min.js"></script>
<script src="<some_path>/jquery.infinitescroll.js"></script>
<script>
    $('.row').infinitescroll({
        itemSelector: '.col',
        nextSelector: '.next-page',
        bufferPx: 40,
    });
</script>

An Ajax call takes place when the first element matching the nextSelector comes closer to the window bottom than the pixels defined in bufferPx during scrolling.

The Ajax call fetches that page which is defined in the href of the first link matching nextSelector.

The elements of the fetched page matching itemSelector are appended to the jQuery collection.

If the next page has an element matching nextSelector as well, the whole procedure repeats.

About

The old infinitescroll is no longer maintained. This is just a try .. for my own purposes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published