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

Replace offset() by position() #21

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

Replace offset() by position() #21

wants to merge 1 commit into from

Conversation

cyrezdev
Copy link

The .position() method allows us to retrieve the current position of an element relative to the offset parent. Contrast this with .offset(), which retrieves the current position relative to the document. When positioning a new element near another one and within the same containing DOM element, .position() is the more useful. (cf. https://api.jquery.com/position/)

This prevents possible positioning issue if container manipulated by another script.

The .position() method allows us to retrieve the current position of an element relative to the offset parent. Contrast this with .offset(), which retrieves the current position relative to the document. When positioning a new element near another one and within the same containing DOM element, .position() is the more useful. (cf. https://api.jquery.com/position/)

This prevents possible positioning issue if container manipulated by another script.
@danimesq
Copy link

Hi, @JoomliC
I've forked TipTip to maintain it and use in all web projects of my community.
Please clone your pull request to: https://github.com/Software-js/TipTip
Thanks!

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.

2 participants