Fork me on GitHub

jQuery Reach Scroll

Actually this plugin will not load new pages and append new elements, it only will work with jQuery events to warn you when the scroll reach the limit of the binder scroll. (Lightweight plugin ~ 3kb minified)

For more information visit our repository.

Follow these simple steps to install:

1. Install

You have three options to install:

  • Download latest release
  • Clone the repo: git@github.com:dhyegofernando/jquery-reach-scroll.git
  • Install with Bower: bower install jquery-reach-scroll

2. Include:

  • Include jQuery (1.7.0+) and the plugin:

                  
                    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
                    <script src="jquery.reach-scroll.min.js"></script>
                  
                

3. Use

  • Call the plugin:

                  
                    $("#my-list").reachScroll({
                      binder: $("#my-list"),
                      extraScrollPx: 20,
                      pauseIfOccurs: true,
                      onReached: function() {
                        alert("The end.");
                      }
                    });
                  
                

    You can also set the reached event like that if you prefer:

                  
                    $("#my-list").on("scrollreached", function() {
                      alert("The end.");
                    });
                  
                

Example: