joehewitt / scrollability

Imitates iOS native scrolling in JavaScript.
http://joehewitt.github.com/scrollability
Other
1.78k stars 147 forks source link

Pull up/down to refresh #23

Closed jimmybyrum closed 8 years ago

jimmybyrum commented 12 years ago

Building off of endtwist's changes [1], I've added pull down to refresh.

An element with the class "pull-down-to-refresh" will be hidden above the "top" of the list and will fire pullingDown, pulledDown and pullDownCancel back to the list.

An elements with the class "pull-up-to-refresh" will be hidden below the "bottom" of the list and will fire pullingUp, pulledUp and pullUpCancel back to the list.

In regard to endtwist's scroll event, I've added a boolean called useOnScrollEvt which defaults to false so that the event is not fired if it's not needed.

[1] https://github.com/joehewitt/scrollability/pull/17

endtwist commented 12 years ago

Looks like you read my mind and got around to the two features I hadn't had a chance to build yet. Nice work!

Should also note: does this work on iOS 5?

jimmybyrum commented 12 years ago

"I learned it by watching you!"

As for iOS 5, I have no idea. If I get a chance to do any testing, I'll add some comments here and in my fork.