Bug Tracker

Ticket #9453 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

$.inArray does not support fromIndex

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

Description (last modified by rwaldron) (diff)

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!

Change History

comment:1 Changed 3 years ago by rwaldron

  • Owner set to rwaldron
  • Priority changed from undecided to low
  • Status changed from new to assigned
  • Component changed from unfiled to core
  • Milestone changed from 1.next to 1.7

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

comment:3 Changed 3 years ago by timmywil

comment:4 Changed 3 years ago by rwaldron

  • Description modified (diff)

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

comment:5 Changed 3 years ago by timmywil

  • Status changed from assigned to closed
  • Resolution set to fixed

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

Changeset: 2e0c9bfd364d990051fc3de94d7abd4194b6ce7d

Note: See TracTickets for help on using tickets.