After fre suggestions from various sources, the script has been
updated. Now all animations are handled by -webkit-transform and we
don't need a timer anymore. Performance are pretty much the same. The
original article has been updated.
On Jan 4, 8:39 am, Matteo <
mat...@gmail.com> wrote:
> When I first studied the iphone webkit I was surprised to see that I
> could not place fixed position elements and could not scroll contents
> inside divs or iframes (with 1 finger gesture). I found a couple of
> overcomplicated solutions to this problem on the web so I tried to
> code everything from scratch and the result is a not perfect but
> functional 4kb script (unminified).
>
> Here a working demohttp://
cubiq.org/dropbox/iphonescroll.html
> (iphone, ipod touch and emulator). If you don't have an iphone at
> hand, watch the screencasthttp://
cubiq.org/media/movies/scrolling-div-iphone.mov
> .
> You'll find some instructions athttp://
cubiq.org/scrolling-div-on-iphone-ipod-touch/5
> and the script itself herehttp://
cubiq.org/dropbox/iscroll.js