/zepto-cycle

A nifty alternative to Zepto’s next and prev methods.

Primary LanguageJavaScriptMIT LicenseMIT

Zepto Cycle

A small plugin that provides a nifty alternative to the next and prev Zepto methods.

Usage

cycleNext

When traversing a collection, cycleNext behaves like next. Once it reaches the end, however, it reverts back to the first item in the collection.

cyclePrev

Similarly, cyclePrev behaves like prev when traversing a collection. Once it reaches the beginning, it reverts back to the last item in the collection.