Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional param offset #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yehorherasymchuk
Copy link

Param offset is needed when you are working with fixed elements. It fix the problems when you have some header which is fixed at the top of the page, and you are trying to check if some item is visible. When item is under the fixed header block, user doesn't see this item, but plugin returns true (item is visible), since it top offset is greater than 0. If you Pass param offset to visible function you'll check whether element is visible under offset. Param offset accepts simple number or object {top: 1, bottom: 2} etc.

Param offset is needed when you are working with fixed elements. It fix the problems when you have some header which is fixed at the top of the page, and you are trying to check if some item is visible. When item is under the fixed header block, user doesn't see this item, but plugin returns true (item is visible), since it top offset is greater than 0. If you Pass param offset to visible function you'll check whether element is visible under offset. Param offset accepts simple number or object {top: 1, bottom: 2} etc.
@joe-watkins
Copy link

👍

@kangabell
Copy link

@EgorIgorevich I want to try your offset out – can you include its usage?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants