#9670 closed bug (duplicate)
selectedIndex returns undefined
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | attributes | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
This works OK in 1.5.2 but returns undefined in 1.6.1
<select name=”testselect” id=”testselect” onChange="alert($(this).attr('selectedIndex'))"> <option value="val1">Value 1</option> <option value="val2">Value 2</option> </select>
Change History (3)
comment:1 Changed 12 years ago by
Component: | unfiled → attributes |
---|---|
Owner: | set to [email protected]… |
Status: | new → pending |
comment:2 Changed 12 years ago by
Priority: | undecided → low |
---|---|
Resolution: | → duplicate |
Status: | pending → closed |
selectedIndex is not an attribute.
Note: See
TracTickets for help on using
tickets.
Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket!
Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, I've created this boilerplate: http://jsfiddle.net/rwaldron/da3nM/ Open the link and click to "Fork" in the top menu.