¿Y como sabes cuando el body llega al final?
pues con el scroll
Código Javascript
:
Ver original$(window).scroll(function(evnt){
var offset = $(window).scrollTop();
if(footerCatch == 0){
footerCatch = $('body').height() - $(window).height();
}
if(offset >= navCatch){
$('#header').not(".fixed-navigation.header-shadow").addClass('fixed-navigation header-shadow');
}else{
$('#header.fixed-navigation.header-shadow').removeClass('fixed-navigation header-shadow');
}
if($(window).height() < $('body').height() && !shortPage){
if(offset >= (footerCatch - 1) && !footerActive){
!footerCaught && catchFooter();
} else {
footerCaught && releaseFooter();
}
}
// Parallax Scrolling for Hero Image
requestAnimationFrame(function(){
slideItem();
});
});
esta es la función que usan.