Absolute .position() value
This question already has an answer here:
From the jquery docs:
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.
http://api.jquery.com/position/
So use .offset()
.
上一篇: 获取所有div的位置
下一篇: 绝对.position()值