Skip to main content

Bug Tracker

Side navigation

#9453 closed enhancement (fixed)

Opened May 28, 2011 03:03PM UTC

Closed September 19, 2011 07:43PM UTC

Last modified March 08, 2012 10:20PM UTC

$.inArray does not support fromIndex

Reported by: Speednet Owned by: rwaldron
Priority: low Milestone: 1.7
Component: core Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:
Description

The $.inArray() function calls the native JavaScript Array.indexOf() function if it's available, but the native function supports an optional second argument of "fromIndex". (See [

The fromIndex argument is very useful, and could be easily added without impacting any existing code from previous versions of jQuery.

Thanks!

Attachments (0)
Change History (5)

Changed May 28, 2011 03:09PM UTC by rwaldron comment:1

component: unfiledcore
milestone: 1.next1.7
owner: → rwaldron
priority: undecidedlow
status: newassigned

If no one in Bugs, Core or UI is opposed, I think this is a good suggestion for 1.7

Changed May 28, 2011 03:31PM UTC by rwaldron comment:2

Changed May 28, 2011 04:06PM UTC by timmywil comment:3

Changed May 28, 2011 05:29PM UTC by rwaldron comment:4

description: The $.inArray() function calls the native JavaScript Array.indexOf() function if it's available, but the native function supports an optional second argument of "fromIndex". (See [https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf]) \ \ The fromIndex argument is very useful, and could be easily added without impacting any existing code from previous versions of jQuery. \ \ Thanks!The $.inArray() function calls the native JavaScript Array.indexOf() function if it's available, but the native function supports an optional second argument of "fromIndex". (See [ \ \ The fromIndex argument is very useful, and could be easily added without impacting any existing code from previous versions of jQuery. \ \ Thanks!

so, land mine and yours to get all the work combined hahaha

Changed September 19, 2011 07:43PM UTC by timmywil comment:5

resolution: → fixed
status: assignedclosed

Allow second argument to be passed to array.indexOf. Fixes #9453.

Changeset: 2e0c9bfd364d990051fc3de94d7abd4194b6ce7d