#8025 closed bug (invalid)
Attribute selector not working in IE8 compatibility mode
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | selector | Version: | 1.5.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
In IE8 with compatibility mode enabled, this selector doesn't work:
$('#ctl00_contentPagePanel_lstActivities option[selected="selected"]').text()
However this selector does work:
$('#ctl00_contentPagePanel_lstActivities option:eq[0]').text()
If I turn off compatibility mode, the first selector works fine. This indicates there is a problem with the attribute selector as defined above in comp mode.
Change History (6)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Component: | unfiled → attributes |
---|---|
Priority: | undecided → low |
Status: | new → open |
Version: | 1.4.4 → 1.5b1 |
Verified IE8 compat is pulling the selected dom property instead of the selected attribute.
For your code/use, you can use option:selected to achieve a cross-browser solution.
comment:4 Changed 12 years ago by
Component: | attributes → selector |
---|
comment:5 Changed 12 years ago by
Version: | 1.5b1 → 1.5.2 |
---|
comment:6 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | open → closed |
Note: See
TracTickets for help on using
tickets.
jsfiddle: http://jsfiddle.net/danheberden/d9Sy8/