Checking if scroll is at bottom in jquery in Google Chrome Checking if scroll is at bottom in jquery in Google Chrome google-chrome google-chrome

Checking if scroll is at bottom in jquery in Google Chrome


Try the following:

$( window ).on( 'scroll', checkScroll );function checkScroll(){    const documentScrollTop     = $( document ).scrollTop();    const documentOuterHeight   = $( document ).outerHeight();    const windowOuterHeight     = $( window ).outerHeight();    if ( documentScrollTop >= documentOuterHeight - windowOuterHeight )    {        //bottom    }}

you don't need to use any element but the window to check if you've hit bottom