#3518 closed bug (invalid)
Opera does not correctly animate(offsetTop)
Reported by: | Owned by: | brandon | |
---|---|---|---|
Priority: | minor | Milestone: | 1.3 |
Component: | offset | Version: | 1.2.6 |
Keywords: | opera animate offsettop | Cc: | [email protected]…, flesler |
Blocked by: | Blocking: |
Description
With this script the Opera brwoser goes first to the top (offsetTop 0) before aniamting to the correct location
Attachments (1)
Change History (9)
comment:1 Changed 14 years ago by
Cc: | [email protected]… flesler added |
---|---|
Resolution: | → invalid |
Status: | new → closed |
comment:2 Changed 14 years ago by
The bug also appears when the DOCTYPE is set, see for example http://blog.mondediplo.net/2008-09-16-Freddie-Mac-Fannie-Mae-la-Chine-et-les
As for jQuery.ScrollTo I used it at first, with the same problem on Opera; that's why I went to a simpler code, in order to try and resolve this bug
comment:3 Changed 14 years ago by
I don't see where to click in that example.
Using the body in your initial demo does make it work.
jQuery.ScrollTo is tested with both transitional and strict doctypes, on IE 6 & 7, FF 2 & 3, Safari 3 and Opera 9.2 & 9.5. All on windows.
comment:4 Changed 14 years ago by
OK but on (my) Opera Mac it first "jumps" to the top, then animates to the anchor. And the same problem happens with scrollTo
comment:5 Changed 14 years ago by
As I told you, once you add a doctype and put it out of quirk mode, you need to use html instead of body.
I tried your example and does what you describe, then put html and all went well. Tried last version of scrollTo and worked all too.
comment:6 Changed 14 years ago by
OK version 1.4 of jquery.localscroll fixes it! I was with 1.3, sorry for the trouble
comment:7 Changed 14 years ago by
I must add that http://dev.jquery.com/browser/trunk/plugins/scrollTo/jquery.scrollTo.js is still 1.3
You need to animate just the body in order to make it work. But... you're putting it into quirks mode. Add a correct doctype and try again, I think you'll need to use $('html') then to make it work properly.
Needless to say, you should use jQuery.ScrollTo for this. It should handle all different browsers (including versions) properly. That is, as long as you add a proper doctype.