Bug 577387: cleanup of the new iQ(...).each

This commit is contained in:
Michael Yoshitaka Erlewine 2010-07-14 00:08:45 -04:00
parent b9bfb1304b
commit 5d1dca9ba4

View File

@ -227,9 +227,14 @@ iQ.fn = iQ.prototype = {
// Function: each
// Execute a callback for every element in the matched set.
each: function( callback ) {
if ( !iQ.isFunction(value) ) {
Utils.assert("each's argument must be a function", false);
return null;
}
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
callback(elem);
}
return this;
},
// ----------