Ticket #9453 (closed enhancement: fixed)
$.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 6 months 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
comment:3 Changed 6 months ago by timmywil
Well, I kinda did it too :P. https://github.com/timmywil/jquery/compare/enhancement_9453
comment:4 Changed 6 months ago by rwaldron
- Description modified (diff)
so, land mine and yours to get all the work combined hahaha
comment:5 Changed 3 months 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
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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