$("body").scrollTop() doesn't update in safari
<p>I'm working on a website:</p>

<p><a href="http://beta.projektopia.se/" rel="nofollow">http://beta.projektopia.se/</a></p>

<p>the body has several background-images that are updated on scroll like this:</p>

<pre><code>$(document).ready(function(){

    $(document).scroll(function(){
        var scrollfactor=$("body").scrollTop()*0.2;
        var centerscrollpos =scrollfactor+613;
        var docheight = $(document).height();
        var windowheight = $(window).height();
        var bottompos = (docheight-980)-((docheight-windowheight)*0.2)+scrollfactor;
        var scrollpos = 'center '+scrollfactor+'px,center '+bottompos+'px, center '+ centerscrollpos+'px,center 0px';
        $("body").css("background-position", scrollpos);
    });
});
</code></pre>

<p>Lots of calculations, but the important thing is that a scrollpos is created that should change the position of the background when you scroll, to create a parallax-effect. It works great in chrome, but in firefox, the variable scrollfactor, that is suppose to get the current scroll-position, doesn't update.</p>

<p>ps, some people have this issue due to lack of correct doctype. I believe i have declared it correctly like this:</p>

<pre><code>&lt;!DOCTYPE html&gt;
</code></pre>
