Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#8646 closed bug (worksforme)

[type=select-one] selector is broken

Reported by: anonymous Owned by: anonymous
Priority: undecided Milestone: 1.next
Component: selector Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:


In earlier versions of jquery, before 1.5.0, the following would return true for normal select-one elements:


Since 1.5.0, including 1.5.1, this is broken. Note that I have verified that:

$(select_element).attr('type') == 'select-one'

Change History (4)

comment:1 Changed 12 years ago by dmethvin

Owner: set to anonymous
Status: newpending

Please quote the attribute since it contains special characters. If there are still problems, please provide a link to a test case in jsFiddle.

comment:2 Changed 12 years ago by addyosmani

Resolution: worksforme
Status: pendingclosed

As per dmethvin, this works fine when you quote the attribute (which we do mention as being necessary for special character use in our docs). Confirmed here http://jsfiddle.net/addyosmani/Ldjap/1/ as working.

comment:3 Changed 12 years ago by [email protected]

Please reopen.

Even properly quoted selectors that include type="select-one" fail for <SELECT> elements. For example: $('select[type="select-one"]');

jsfiddle: http://jsfiddle.net/Ldjap/6/

comment:4 Changed 12 years ago by Rick Waldron

Component: unfiledselector

You're mistaking DOM properties with HTML element attributes


Note: See TracTickets for help on using tickets.