sergi/virtual-list — pull request #2 by jakeboone02 (2013-06-28 21:17:54+00:00)
Title: Make generatorFn more versatile

Pass the items array element as second parameter to generatorFn. This way `items` can be an array of anything (Backbone.Models, jQuery collections, etc.), and `generatorFn` can handle it however it wants.

Example:
```
var i, bigList = [];
for (i = 0; i < 10000; i++) {
bigList.push({name: "Test Item " + i, desc: "I'm a description"});
}

var list = new VirtualList({
h: window.innerHeight,
itemHeight: 30,
items: bigList,
generatorFn: function(idx, row) {
return $("

", {text: row.name + " -|- " + row.desc, css: {height: "30px"}})[0];
}
});
```