开发者

Prototype Equivalent JQuery's offset()

I would like to know if there开发者_StackOverflow社区 is any prototype equivalent to the JQuery's .offset() function?

Thanks for your help.


jQuery's offset (element position relative to document) maps to Element.cumulativeOffset

similarly, jQuery's position (element position relative to offset parent) maps to Element.positionedOffset


If you are looking for offset relative to document, go for:

Element.cumulativeOffset

If you are looking for offset relative to an element however, go for:

Element.Offset.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜