X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fcore.js;h=a7cbdc99cc69fd2650993ed21e4011c30c909f0d;hb=1e750a00e988b4738e4b47b923bd78dbaffa6fb8;hp=65532584788b9ab250c57f3d0564b99e806fc6b4;hpb=9d8d74569c8114f9c9b0f42bca71536e154c5944;p=jquery.git diff --git a/src/core.js b/src/core.js index 6553258..a7cbdc9 100644 --- a/src/core.js +++ b/src/core.js @@ -40,7 +40,8 @@ var jQuery = function( selector, context ) { // Save a reference to some core methods toString = Object.prototype.toString, push = Array.prototype.push, - slice = Array.prototype.slice; + slice = Array.prototype.slice, + indexOf = Array.prototype.indexOf; jQuery.fn = jQuery.prototype = { init: function( selector, context ) { @@ -522,6 +523,12 @@ jQuery.extend({ } }); +if ( indexOf ) { + jQuery.inArray = function( elem, array ) { + return indexOf.call( array, elem ); + }; +} + // All jQuery objects should point back to these rootjQuery = jQuery(document);