#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: |
Description
In earlier versions of jquery, before 1.5.0, the following would return true for normal select-one elements:
$(select_element).is('[type=select-one]')
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
Owner: | set to anonymous |
---|---|
Status: | new → pending |
comment:2 Changed 12 years ago by
Resolution: | → worksforme |
---|---|
Status: | pending → closed |
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
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
Component: | unfiled → selector |
---|
You're mistaking DOM properties with HTML element attributes
Please quote the attribute since it contains special characters. If there are still problems, please provide a link to a test case in jsFiddle.