mobify/scooch — pull request #27 by olliecook (2014-11-10 11:40:37+00:00)
Title: Move to first slide on refresh()

I have found that when updating m-items (e.g. with Ajax call for fresh data) and then calling refresh(), the scrolling behaviour is undefined when the number of elements changes, and the control buttons can end up with two items m-active at once (perhaps because _index is not updated).

I propose the following change which scrolls to the first slide upon calling refresh.

I think this may make sense as a default, but I'd be happy to add an option (e.g. scrollFirstOnRefresh) if that's required.