mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Landing Ben Alman's patch to add nextUntil, prevUntil, and parentsUntil. Also adds some tests for prevAll and nextAll, and fixes an test edge case in parents.
This commit is contained in:
@@ -484,13 +484,14 @@ jQuery.extend({
|
||||
return ret;
|
||||
},
|
||||
|
||||
map: function( elems, callback ) {
|
||||
// arg is for internal usage only
|
||||
map: function( elems, callback, arg ) {
|
||||
var ret = [], value;
|
||||
|
||||
// Go through the array, translating each of the items to their
|
||||
// new value (or values).
|
||||
for ( var i = 0, length = elems.length; i < length; i++ ) {
|
||||
value = callback( elems[ i ], i );
|
||||
value = callback( elems[ i ], i, arg );
|
||||
|
||||
if ( value != null ) {
|
||||
ret[ ret.length ] = value;
|
||||
|
||||
Reference in New Issue
Block a user