iScroll 5

iScroll 5 is a faster more mature code than the previous versions. It doesn’t add many new features but it fixes bugs and most notably runs smoother on old devices. Please note that previous releases are not maintained nor supported, so go get the new version!

iScroll finally got its very own domain. Full documentation can be found on iscrolljs.com.

iScroll is a high performance, small footprint, dependency free, multi-platform javascript scroller.

It works on desktop, mobile and smart TV. It has been vigorously optimized for performance and size so to offer the smoothest result on modern and old devices alike.

iScroll does not just scroll. It can handle any element that needs to be moved with user interaction. It adds scrolling, zooming, panning, infinite scrolling, parallax scrolling, carousels to your projects and manages to do that in just 4kb. Give it a broom and it will also clean up your office.

Even on platforms where native scrolling is good enough, iScroll adds features that wouldn’t be possible otherwise. Specifically:

  • Granular control over the scroll position, even during momentum. You can always get and set the x,y coordinates of the scroller.
  • Animation can be customized with user defined easing functions (bounce, elastic, back, …).
  • You can easily hook to a plethora of custom events (onBeforeScrollStart, onScrollStart, onScroll, onScrollEnd, flick, …).
  • Out of the box multi-platform support. From older Android devices to the latest iPhone, from Chrome to Internet Explorer.

The future

We’ve gone so far… Can you believe all this started in 2008. Yeah, it’s 6 years already.

The script has become much more than a simple scroller, but the original (current) structure is too tight to handle all the things I wish the iScroll would be capable of.

That’s why I’m trying to build a completely refactored version, it might end up into a new project (ie: not iScroll), I don’t know just yet.

The new code would be based on modules and pluging and adding new features would be way easier than it is now.

Worry not, iScroll 5 as it is now will continue to get updates and bug fixes, but stay tuned for future development, being that iScroll 6 or a new project.

Support development

If this script saved your day and you wish to support future developments you may consider sending some funds via PayPal, Flattr or BitCoin (wallet: 1T6W3916Hfozna2XAdAzUfcjzEoRk1EiP )





28 thoughts on “iScroll 5”

  1. Can’t get the horizontal demo to work in Chrome & Safari on iOS7/iPhone 5 🙁 Going to use iScroll4 for now.

  2. Can it support invert infinite scroll? for example add items at top of the list

    Thanks! great job!

  3. Thanks! great job!
    Only in Firefox the mousewheel is very slow, for my job I added after line 304 in “iscroll.js“:

    this.multplFF=(navigator.userAgent.match(/(Firefox)/))?(this.options.mouseWheelSpeed/3):(1);

    and use it at line 1047-1048 replaced with:

    wheelDeltaX = -e.deltaX * this.multplFF;
    wheelDeltaY = -e.deltaY * this.multplFF;

    Tested only in firefox, chromium, explorer 10; this resolved my problem, but I hope it can help someone.
    Thanks!

  4. Hi Matteo,

    actually i’m using iScroll4 in conjunction with jQuery Mobile and the iScrollView-Wrapper done by Jhon Tara.

    I’ve tryed to marry iScroll5 with JQM, but have had no success. Even static markup (not dynamicly created) will not scroll.
    Where iScrollView (as Wrapper and iScroll4) is working very feasible.

    The events are triggered perfectly when using iScroll5 on a wrapper but no scrolling happens at all. I’ve noticed, that no additional markup is added to the wrapper, except the transitions.

    Do you know, why this is? As far as i can tell iScroll4 worked even when used without iScrollView as a wrapper. But how come, that iScroll5 is not?

    BTW: Many thanks in advance. You’re doing a great job and i appreciate your expenditure on providing us such a gem.

    Sincerely TorchMan

  5. Is it possible to have an iscroll with snap allowed only horizontally and have free vertical scrolling? Something like
    {
    snapX: ‘li’,
    freeScrolling: ‘y’
    }
    That would be a very nice feature 🙂

  6. Hello, thank you for your work!
    Is it possible to not reinitialize new instance of iScroll for every static mobile page, just send object that need to be scroll and it is dimention with additional params?

    Best regards,
    Vladimi Minkin

  7. This thing is awesome . After ef-ing around with other carousels for days, got this thing working in minutes! I’m using KnockoutJS, so the other carousels didn’t play well with it. Oh…. scrollToElement()….genius *and* centering the scrolled to element on the screen…brilliant!

  8. Hello! iScroll is really great!
    Are there any “Pull to Release” function in iScroll 5?

  9. How to use jquerymobile in iscroll-infinite, because I use the effect shown in JQM poor, thank you! !
    iscroll5 is really awesome

  10. Hi! Really great work, Matteo.

    I’m trying to develope an ebook reader (html5 ebook, converted from pdf) and iScroll has improved performance incredibly. Thanks a lot!

    Anyway, we are facing a problem mainly with iOS. When scrolling quickly, content usually disappears until scroll has been “completed”. That’s one thing I’d like to fix, but the main issue occurs when swiping again when content is still hidden. It looks like iOS takes this gesture as a very long swipe … so after a few seconds, you can see how scroll has gone to top/bottom (depending on direction).

    It’s a bit hard to explain but I hope you get the point.

    Sorry for my bad English.
    I’ll be looking forward to your answer.

    Thanks for your great work!

  11. Thanks very much for your hard working!
    How to enable long pressing content inside an iscroller on mobile devices such that users can copy/select some text or save a picture ?

  12. Hi Matteo,
    i’m using snap.js to have some left/right panels opened progressivly when a user swipes left or right.
    iScroll and snap.js are listening to touch-events respectively. Sometimes it happens that when i swipe right, in order to open a panel i’m simultaneously scrolling. Is there a way to tell iscroll, to stop eventlistening at all? Something like a switch to turn isScroll-event-listening on and off?

    Kind regards,
    TorchMan

    PS: actually i was able to get iScroll5 working with jQuery Mobile.

    1. Ah – got it! Same as in iScroll4.

      Just use:
      myScroll.enable();
      myScroll.disable();

      Never mind!

  13. How iscroll5 work with jquery mobile 1.3.2?It does not work . I left message in GitHub already.

    1. It does work. I suffered the same problem. Make sure, you’re refreshing the iScroll after PageInit. Get rid of overflow:auto in your CSS – it doesn’t play well with iScroll, give the body a overflow:hidden, disable overlfow-y on your wrapper.

  14. Hi Matteo.

    Great job!

    I only have one problem. In an PhoneGap Application for windows phone 8, when the scroll ends, a click event is fired. Like it’s very sensitive. Do you know if it is possible to fix this?

  15. Hi Matteo.
    I would like to know about iScroll5’s supported browser.
    Does it support more than ie8?
    Thanks for your amazing project!!^^b

  16. Hi Matteo.
    Very nice project.
    Is it possible to add to iscroll5 a function to make it a loop? like after you reach the 50th item, under that is the 1st item?

  17. Is it possible the 1st and last item reach th middle of the ul?
    Example: I wanna select the item that is in the middle of the ul, but everytime i want to reach the 1st, last item i cant do it.. is there any solution for that?
    Thanks

Comments are closed.