diff options
Diffstat (limited to 'src/core.js')
-rw-r--r-- | src/core.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core.js b/src/core.js index cdd78517f..611e5363b 100644 --- a/src/core.js +++ b/src/core.js @@ -441,6 +441,10 @@ jQuery.extend({ }, inArray: function( elem, array ) { + if ( array.indexOf ) { + return array.indexOf( elem ); + } + for ( var i = 0, length = array.length; i < length; i++ ) { if ( array[ i ] === elem ) { return i; |