Skip to content

jgoulah/backbone-collection-iterator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Backbone collection iterator v0.1

Simple prev and next functionality on a backbone collection

Usage

Include backbone-collection-iterator.js after having included backbone.js:

<script type="text/javascript" src="backbone.js"></script>
<script type="text/javascript" src="backbone-collection-iterator.js"></script>

Given a model in a collection, get the prev or next based on the insertion order:

nextmodel = someCollection.next(model);
prevmodel = someCollection.prev(model);

About

prev and next functions on a collection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published