iterates through the collection of data items
method | function | a method that needs calling for each data item |
master | object | an object that the method is applied to ("this" by default) |
all | boolean | if true, hidden (as well as hidden by filtering) items are iterated |
template:function(data){
var names = [];
if (data.each)
data.each(function(obj){ names.push(obj.name);});
return names.join(", ");
}
The method function has two parameters:
template:function(data){
var names = [];
if (data.each)
data.each(function(obj, index){
names.push(obj.name);
console.log(index + " is the index of the file")
});
return names.join(", ");
}