Pull-to-refresh feature and scroll event #17

Closed
wants to merge 3 commits into
from

Projects

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
0f98e7d
Owner

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'
Conflicts:
	scrollability-min.js
	scrollability.js
5ef64ef
Joshua Gross Build scrollability.js back into a single file; tweak scrollbar opaci…
…ty timing
f5a9395
@jimmybyrum jimmybyrum referenced this pull request Aug 25, 2011
Closed

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