if you want to trigger a function when bottom of view, hit top of your content, you can use this function:
$('.ModuleWrapper').waypoint(function (direction) {
// Codes Here
}, {
offset: function () {
return $(this).height();
}
});
or when bottom of view, hit bottom of your content, you can use this function too:
$('.ModuleWrapper').waypoint(function (direction) {
// Codes Here
}, {
offset: function () {
return -1 * $(this).height();
}
});
it uses waypoint