webcreate/infinite-ajax-scroll — pull request #23 by romainhill (2012-07-05 10:48:25+00:00)
Title: new option : scrollInContainer (fix issue 17)

First of all, congrats for your plugin, it really rocks ;)

I add an option to fix the 17 issue.
(https://github.com/webcreate/infinite-ajax-scroll/issues/17)

First I needed to add an option to specify the object which listen for scroll events.

Then I realized there are two main cases :

- your container is not scrollable and is going to the bottom of the $(window). You want to trigger scroll events from the $(window) object. This is how this plugin is used now.

- your container is small and scrollable (for instance, a small scrollable div to show comments without scrolling the window). In this case you want scroll events to be triggered from the container itself.

The scrollInContainer option will listen scroll events from the container if set to true, and from the window object if set (by default) to false.

Hope you like it,

Romain