-
Notifications
You must be signed in to change notification settings - Fork 157
Open
Description
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
.
Metadata
Metadata
Assignees
Labels
No labels