imakewebthings/jquery-waypoints — Issue #28: Need a way to manually fire a scroll check
Author: markct
Created: 2011-11-25 19:14:57+00:00
State: open

Use case: Infinite scroll. When window height is sufficiently large, the bottom item is already in view. I expect waypoints already in view to be immediately triggered.

It appears that Waypoints tries to handle this scenario by calling doScroll() on the window load event. However, I am using Waypoints on a part of the page which is loaded after the window load event has been fired, so the scroll check never happens.

As a workaround, I am calling jQuery(window).trigger('scroll'); however, in my opinion, this is not an acceptable solution, since the window has not really been scrolled, and there may be unrelated handlers on that event.

Have I missed something in the docs? Am I doing this totally wrong?