Use .scrollTop()
(jQuery) to see how far a user has scrolled through a page:
$(document).scroll(function(){
if ($('.pageX').scrollTop() > 0) {
/*JavaScript to be executed*/
}
});
I have given page X a class of pageX, and the instance that page X fills up the entire window your JavaScript will start.
.scrollTop()
looks for how many pixels of the element are above the page (out of site), so if you wanted your functions to begin before the window is filled with page X you can change the 0
to a negative number, eg. if ($('.pageX').scrollTop() > -70)
will start your javascript when page X is filling up most of the window.