Necesito que comience la carga de la segunda pagina antes de llegar al final de la pagina.
Este es el codigo.
Código:
Alguna solucion? // Load more on scroll
detectScroll: function( $pagination, query_args ) {
$( window ).on( 'did-interval-scroll', function() {
// If it's the last page, or we're already loading, we're done here
if ( lastPage || loading ) {
return;
}
var paginationOffset = $pagination.offset().top,
winOffset = $( window ).scrollTop() + $( window ).outerHeight();
// If the bottom of the window is below the top of the pagination, start loading
if ( ( winOffset > paginationOffset ) ) {
koji.loadMore.loadPosts( $pagination, query_args );
}
} );
},


