This demo works best on iPhone, iPad and in WebKit Nightly. Safari 4 kind of works, too.
On Safari mobile TouchScroll benefits from hardware acceleration for CSS transforms and transitions, which allows for very smooth scrolling. Android hasn’t any hardware support, which makes the animations choppier than on Apples devices.
The scroller updates its dimensions and position automatically on window resizes (
window.onresize), orientation changes (
window.onorientationchange) and DOM modifications inside the scroller (
DOMSubtreeModified event). It only needs to be updated manually when it wasn’t visible on initialization (or last update) as soon it is made visible again.
TouchScroll allows you to customize many aspects of the scrolling behavior. The following aspects are configurable:
TouchScroll is released under a BSD license. You can find more information on how to get TouchScroll on our blog.
Photo: “olympic montage 01” by Daveybot – cc licensed.