iScroll 4 is a complete rewrite of the two years old scrolling script, that’s why I’m not yet pushing it to the main project page. You can instead play with it on github or enjoy some demos I’ve baked for you (please continue reading for direct links).
The new features are not limited to:
- Faster, smoother momentum (even on Android). Video | Demo.
- Pull down/up to refresh. I’ve tried many solutions to get this famous fancy functionality, it’s still not 100% accurate, but still looks pretty good for a beta. Video | Demo.
- Pinch / Zoom with gestures and double-tap. Video | Demo.
- Snap to element. You can provide a list of elements and iScroll will snap to the top-left corner of each of them. Video | Demo.
- Custom scrollbars. You can now customize the scrollbars at your likings with just a spoonful of CSS. Video | Demo.
In the package is also included a lite edition. iScroll is evolving and adding new features, but if all you need is a plain simple scroller you better use the no frills iScroll lite (10kb).
Version 4.0 final will also include
onZoomEnd events for a deeper level of hackability. What instead is missing and will be included in version 4.1 is: hash change support (if you access the page with #element-id) and full mobile+desktop browser support. (You can spot a couple of preliminary functions in the code that will be later used for this purpose).
Now please help me debug this beast so we can finally retire v3.7. The script is –as always– free, open source, and MIT licensed. (yes, Mr. Big Corporate, that means that you can use it freely and I won’t come over you asking for my share of chips. Sorry to stress on this, but you don’t know how many times I’ve been asked about licensing issues).