mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
2.0: Remove inArray shim
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
This commit is contained in:
parent
bd9498c5ee
commit
af06c3c771
20
src/core.js
20
src/core.js
@ -615,25 +615,7 @@ jQuery.extend({
|
||||
},
|
||||
|
||||
inArray: function( elem, arr, i ) {
|
||||
var len;
|
||||
|
||||
if ( arr ) {
|
||||
if ( core_indexOf ) {
|
||||
return core_indexOf.call( arr, elem, i );
|
||||
}
|
||||
|
||||
len = arr.length;
|
||||
i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
|
||||
|
||||
for ( ; i < len; i++ ) {
|
||||
// Skip accessing in sparse arrays
|
||||
if ( i in arr && arr[ i ] === elem ) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
return core_indexOf.call( arr, elem, i );
|
||||
},
|
||||
|
||||
merge: function( first, second ) {
|
||||
|
Loading…
Reference in New Issue
Block a user