开发者

jQuery's offset() function

开发者 https://www.devze.com 2022-12-22 16:48 出处:网络
I know jQuery does most when it comes to cross-browser issues. I just wanted to know if offset() method of jQuery serves the purpose of cross-browser compatibility, I mea开发者_如何学运维n top, left,

I know jQuery does most when it comes to cross-browser issues. I just wanted to know if offset() method of jQuery serves the purpose of cross-browser compatibility, I mea开发者_如何学运维n top, left, etc properties that can be derived from it?

Basically once I apply top, left, etc properties (which are derived from offset() function) to an element, I need to make sure that the element appears at the specified location across all browsers.


Unless otherwise noted in the documentation, all jQuery methods will work in every supported browser.

You can also search the bug tracker.


Assuming what you're doing doesn't involve taking the element out of flow and the document re-flowing, it should behave the same in all browsers. If you cause a re-flow, you need to reposition in some edge cases.

0

精彩评论

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

关注公众号