The problem that I’m trying to resolve can be seen here:
http://jsfiddle.net/AAyLj/14/
Basically, when I scroll the papa div, the boy div is supposed to move up/down. This is working fine but there is a bit of a jitter on the boy div. This is because (I think) the js isn’t being processed fast enough. On a powerful Mac, this doesn’t happen – but it happens on PC’s.
Is there a way to overcome this jitter with js or css? Thanks.
UPDATE:
I cannot use fixed position because there are other elements on the page (not shown in the jsfiddle) that will skew the look if I keep the boy div as position:fixed.
As karthikr is saying, you should probably use the CSS
position: fixed. If that is not what you want, you could use theanimatefunction. It gives a nice small delay to it.See the jsFiddle to see what I mean.