each

iterates through the collection of data items

void each(function method, [object master,boolean all] );

Parameters

methodfunctiona method that needs calling for each data item
masterobjectan object that the method is applied to ("this" by default)
allbooleanif true, hidden (as well as hidden by filtering) items are iterated

Example

template:function(data){
        var names = [];
        if (data.each)
            data.each(function(obj){  names.push(obj.name);});
        return names.join(", ");
}

Related samples

See also
Back to top