Skip to main content

Bug Tracker

Side navigation

#9670 closed bug (duplicate)

Opened June 25, 2011 04:22PM UTC

Closed June 26, 2011 05:16AM UTC

Last modified June 26, 2011 05:16AM UTC

selectedIndex returns undefined

Reported by: Owned by:
Priority: low Milestone:
Component: attributes Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:

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>


Attachments (0)
Change History (3)

Changed June 25, 2011 04:41PM UTC by rwaldron comment:1

component: unfiledattributes
owner: →
status: newpending

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: Open the link and click to "Fork" in the top menu.

Changed June 26, 2011 05:16AM UTC by timmywil comment:2

priority: undecidedlow
resolution: → duplicate
status: pendingclosed

selectedIndex is not an attribute.

Changed June 26, 2011 05:16AM UTC by timmywil comment:3

Duplicate of #9088.