Pull-to-refresh feature and scroll event #17

wants to merge 3 commits into


None yet

2 participants

I needed a pull-to-refresh at the bottom of the list for pagination, so I built it in. I haven't had the need/time to add a top-of-list pull-to-refresh but it would definitely be useful. You just drop an element with the class name "pull-to-refresh" in your scroll list, and it fires events (pullingUp, pulledUp, and pullCancel) automatically.

As well, I've made scrollability emit a scroll event during scrolling. I throttled it to once per every 20ms so that it wouldn't fire too frequently, but often enough that you can do something such as "sticky headers." It doesn't bubble, so it won't interfere with the scrollToTop feature.

I'm not sure if these are "clean enough" solutions. Definitely open to suggestions on how to improve these additions.

Joshua Gross * Simple bottom of list pull-to-refresh
* onScroll event emitted

Cool, this looks good. I may not have a chance to thoroughly test and merge it for a while, but I'll get to it.

Joshua Gross added some commits Oct 13, 2011
Joshua Gross Merge remote-tracking branch 'joehewitt/master'
Joshua Gross Build scrollability.js back into a single file; tweak scrollbar opaci…
…ty timing
@jimmybyrum jimmybyrum referenced this pull request Aug 25, 2011

Pull up/down to refresh #23

@endtwist endtwist closed this Dec 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment