Skip to content
Permalink
Browse files

Fixes #8814. Clean up inArray.

  • Loading branch information...
rwaldron authored and dmethvin committed Apr 10, 2011
1 parent f182b7b commit 8c40c00fac2f30fa0804ae8097642636f9718ddd
Showing with 4 additions and 8 deletions.
  1. +4 −8 src/core.js
@@ -658,8 +658,9 @@ jQuery.extend({
},

inArray: function( elem, array ) {
if ( array.indexOf ) {
return array.indexOf( elem );

if ( indexOf ) {
return indexOf.call( array, elem );
}

for ( var i = 0, length = array.length; i < length; i++ ) {
@@ -843,12 +844,6 @@ if ( jQuery.browser.webkit ) {
jQuery.browser.safari = true;
}

if ( indexOf ) {
jQuery.inArray = function( elem, array ) {
return indexOf.call( array, elem );
};
}

// IE doesn't match non-breaking spaces with \s
if ( rnotwhite.test( "\xA0" ) ) {
trimLeft = /^[\s\xA0]+/;
@@ -898,3 +893,4 @@ function doScrollCheck() {
return jQuery;

})();

0 comments on commit 8c40c00

Please sign in to comment.
You can’t perform that action at this time.