.each(fn)
Available on: InDomArrayExecutes a function for each InDom object in the collection.Parameters:
fn {(n: InDom, index: number, array: InDomArray) => void} - Function to execute
Returns: {InDomArray} - this for chainingExamples:$a('.example>div').each(n => {
if (!n.hasData('init')) {
// one-time initialisation
n.setData('init', 1);
}
});
// .each() is safe on empty collections: the callback simply never runsNext: filter »