.position() retunrs the same value that .offset()
Hello,
I´m new in jQuery, and I have read documentation about .position() (relative to the offset parent) and .offset() (relative to the document).
I have an <ul> within a centered <div>, and I cant figure out why both, position and offset, return the same value, the value relative to the document.
The problem is .position(). It should return 0 and it returns 472, that is the correct value returned by .offset().
I have tried changing the elements position css attribute, but it still returns the same value.
I have fixed it with a trick, but I´d like to understand how each function works, and I couldn´t catch it in the documentation. So, it would be great that an expert could give me a light.
Thanks in advance!