How to get the correct offset top value from webkit (Chrome/Safari) with jQuery? Webkit bug?
- 阅读更多 关于 How to get the correct offset top value from webkit (Chrome/Safari) with jQuery? Webkit bug?
问题 I'm working on code that programmatically positions a div to give the appearance of scrolling. All works fine when using Firefox and Internet Explorer (believe it or not). However, I'm getting bogus values from webkit browsers (Chrome/Safari). It appears to have something to do with whether an element has content. I'm calculating the position of an empty anchor element. Webkit seems to get it right only when the element has visible content. So, I could work around this by having some content