This documentation is currently being moved to our new documentation site.

Please view or edit the documentation there, instead.

If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.

fluid.each

This functionality is Sneak Peek status. This means that the APIs may change. We welcome your feedback, ideas, and code, but please use caution if you use this new functionality.

fluid.each(source, func)

Better jQuery.each which works on hashes as well as having the arguments the right way round.

fluid.each(source, func);

File name: Fluid.js

Parameters

source (Arrayable or Object) The container to be iterated over.
func (Function) A function accepting (value, key) for each iterated object. This function may return a value to terminate the iteration

Return Value

None

See Also


Example

var now = <current time>;
var items = [... an array of objects ...];
fluid.each(items, function(entry) {entry.timeStamp = now;});

In this example, the current time is added to each object in the array items.