I have a div with position \"fixed\" and I want to get the value of its position relative to the whole document while the user scrolls down the page.
So
you can use .offset() to get the current coordinates of the element relative to the document whereas .position() to get the current coordinates of an element relative to its offset parent.
.offset()
.position()