Waypoints for jQuery is a really nice plugin that makes it easy to execute a function whenever the user scrolls an element into view:
Using the plugin is easy, too. Simply bind the waypoint function to the element that should trigger the event:
[javascript]
$(‘#myElement’).waypoint(function() {
alert(‘You have scrolled to the element.’);
});
[/javascript]
View the project’s homepage, check out the various settings, see it in action, and grab the source here.
Speak your mind...