Opened 13 years ago
Closed 12 years ago
#6164 closed bug (invalid)
issue with index method (DOM Element Method)
Reported by: | chrismo111 | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.4.2 |
Component: | misc | Version: | 1.4.1 |
Keywords: | index, DOM Element Methods | Cc: | |
Blocked by: | Blocking: |
Description
Problem with .index method (Miscellaneous > DOM Element Methods), http://api.jquery.com/index/
Here's a scenario that worked in 1.3.2 but does not in version 1.4.2:
var fruits=["apple","orange","pear"]; var i = $(fruits).index("pear"); alert(i);
In version 1.3.2 the value of i is 2. In version 1.4.2 the value is -1
a non jquery alternative is indexOf BUT IE6 doesn't support it
Change History (1)
comment:1 Changed 12 years ago by
Priority: | → undecided |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
I don't think we support wrapping an array of strings in a jQuery object and then applying jQuery methods on that. It may have worked in the past by chance.