jQuery Waypoints is a lightweight (3.7kB minified) plugin that makes it possible to execute a function when an element is scrolled in to view.
A few examples are provided that demonstrate infinite scrolling, sticky elements, scroll analytics and dial controls.
Comprehensive documentation is provided on the jQuery Waypoints website.