Hi,
I think there's a bug when using negative tolerance.
if I put an element squarely in the centre of the screen and call:
$(#test).is(':in-viewport(-100)');
It will return false.
This is because the bottom is less than the settings.tolerance (which is set to the viewport height minus the offset).
isVisibleFlag = settings.tolerance ? top <= settings.tolerance && bottom >= settings.tolerance : bottom > 0 && top <= $viewportHeight
I believe that this should be bottom <= settings.tolerance.
Hi,
I think there's a bug when using negative tolerance.
if I put an element squarely in the centre of the screen and call:
It will return
false.This is because the
bottomis less than thesettings.tolerance(which is set to the viewport height minus the offset).I believe that this should be
bottom <= settings.tolerance.