Function (object, callback, argS ){
// This method has three parameters: Object OBJ for operation, FN for operation, and ARGs for function parameter
VaR name, I = 0, length = object. length;
If (ARGs ){
If (length = undefined ){
For (name in object)
{
If (callback. Apply (object [name], argS) === false)
{
Break;
}
}
}
Else
{
For (; I <length ;)
{
If (callback. Apply (object [I ++], argS) === false)
{
Break;
}
}
}
}
Else
{
If (length = undefined ){
For (name in object ){
If (callback. Call (object [name], name, object [name]) === false ){
Break;
}
}
}
Else
{
For (VaR value = object [0]; I <length & callback. Call (value, I, value )! = False; value = object [++ I]) {}
/* Object [0] gets the first Dom element in the jquery object through the for loop,
Get each Dom element corresponding to the entire jquery object and Use callback. Call (value, I, value );
Point this object of callback to the value object and pass two parameters. I indicates the index value and value indicates the DOM element;
Callback is similar to function (index, ELEM.
So we get $ ("..."). Each (function (index, ELEM ){...});
*/
}
}
Return object;
}