Ticket #4040 (closed bug: wontfix)
Attribute Filters bug in IE (document vs. document.body)
| Reported by: | colorwind.zhf | Owned by: | john |
|---|---|---|---|
| Priority: | major | Milestone: | 1.3.2 |
| Component: | selector | Version: | 1.3.1 |
| Keywords: | ie document body | Cc: | |
| Blocking: | Blocked by: |
Description
<div class="cs1" name="node1"></div>
The code: $(".cs1[name='node1']") can not match this node in IE.
Attachments
Change History
comment:2 Changed 4 years ago by dmethvin
- Keywords ie added
- need changed from Review to Patch
- Component changed from unfilled to selector
- Owner set to john
Confirmed, this also fails in IE8 RC1. Putting the code in a .ready() doesn't help either. Thanks for the test case!
comment:3 Changed 4 years ago by dmethvin
- Keywords document body added
- Summary changed from Attribute Filters bug in IE to Attribute Filters bug in IE (document vs. document.body)
Also reported in #4084.
comment:4 follow-up: ↓ 5 Changed 4 years ago by john
- Status changed from new to closed
- Resolution set to wontfix
Actually, this isn't related to #4084 - this has to do with using getElementsByName.
The problem here is that you have an invalid attribute on an element (name attributes aren't valid on divs). Thus IE is having trouble finding them - I recommend using a different attribute instead (maybe a class - or an ID?).
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.


I tried creating a test case but it worked for me. What version of IE and what doctype? Can you provide a complete test case?