Changing Display Resets Scroll Offset
In Chrome 5, Safari 4, Opera 10.53 and sometimes Firefox (although I was unable to reproduce it in this test case), changing the visibility of the
element by toggling
display:none will cause the scroll offset to reset to zero. Toggling
not seem to trigger the same problem.
Scroll the container and then toggle the classes applied.
I haven't tested this in Internet Explorer, yet. Feel free to report in the comments.