Modify ↓
Ticket #4654 (closed bug: wontfix)
Window scrolling in Opera
| Reported by: | freelancerid | Owned by: | brandon |
|---|---|---|---|
| Priority: | major | Milestone: | 1.3.2 |
| Component: | offset | Version: | 1.3.2 |
| Keywords: | scroll window up | Cc: | freelancerid |
| Blocking: | Blocked by: |
Description
Dear,
I have experienced a problem with scrolling window up in Opera browser. I used this code: $('html, body').animate({scrollTop: $('#scrollDown').offset().top}, 2000);
It jumps up then animate down. But it should animate UP.
You can see it here: http://blog.freelancer-id.com/index.php/2009/03/26/scroll-window-smoothly-in-jquery
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

You need to detect whether html or body need to be used, according to the browser you're in. Opera supports both, so it has 2 animations going down and it goes mad.
You could check the plugin jQuery.ScrollTo which does just this.