As far as I'm aware, this
$('selector').each(func);
is the equivalent of doing this:
func = ...;
$selector = $('selector');
for (var i = 0; i < $selector.length; i++) {
if (func.call($selector[i], i, $selector[i]) === false) {
break;
}
}
The object returned by a $ selection is actually an array of DOM elements with a whole bunch of extra methods attached to it, so you basically can work with it just like you would an Array. Hope that clears things up!