
Smooth scrolling in Opera
$("html:not(:animated), body:not(:animated)").animate({scrollTop: $(this).position().top});
When using this code in opera, scrolling starts not from the current position, but from the very top of the page, a very unpleasant effect. Example You can
fix this if you leave animation only in html:
$("html:not(:animated)"+( ! $.browser.opera ? ",body:not(:animated)" : "")).animate({scrollTop: $(this).position().top});
Example 2