Safari 6 test page

Safari 6 (Build 8536.25) seems to choke on jQuery .scrolltop() function.

This demo will perform the following tasks:

  1. Check the scrollbar position of the body element
  2. Scroll the body element to 100px
  3. Check the scrollbar position of the body element

JavaScript alerts will display the results in between each instruction. Basically, the page will scroll down a 100px.

Safari 6 will perform the scroll, but will report an incorrect value after the scroll is performed unless you repeat the call to $scrollElement.scrollTop(). The second call reports the correct current value.

Run JavaScript .scrollTop test

Ori. davidroessli.com/logs/2012/07/safari_6_breaks_my_javascript/ by @roessli