Already fixed. If Array.prototype.indexOf exists, then it is always
used.
On Dec 14, 10:38 am, helianthus project.heliant...@gmail.com wrote:
This occurs when using jQuery.fn.index, which utilizes jQuery.inArray.
Since the jQuery object does not have an indexOf method, it falls back
to the for
it's no about Array.prototype.indexOf. where ie it?
On Dec 14, 5:38 pm, helianthus project.heliant...@gmail.com wrote:
This occurs when using jQuery.fn.index, which utilizes jQuery.inArray.
Since the jQuery object does not have an indexOf method, it falls back
to the for loop approach, while
Why is it done this way:
inArray: function( elem, array ) {
if ( array.indexOf ) {
return array.indexOf( elem );
}
for ( var i = 0, length = array.length; i length; i++ ) {
if ( array[ i ] ===
The case is precisely it: We do it that way because we need to support
array-like objects as well. (The docs are written in that particular
manner because saying .inArray(ArrayLikeObject) would probably just
confuse the issue.)
If the difference is between doing an extra .call() (which is slower