Back

.each( iteratee )

Iterate over each matched element

Aliased as .forEach() for convenience

Params

iteratee{Function}A function to be invoked once for each element. (element, index, collection) are passed as arguments. Within the iteratee, `this` refers to the current element.

Returns

DollarJS (chainable)

Examples

$('p').each(function (elem) { console.log(elem); })
$('p').each(function () { console.log(this); })