Modify ↓
Ticket #915 (closed bug: wontfix)
$('#register') matches more elements than only id's set to register in IE6
| Reported by: | lukas@… | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | core | Version: | |
| Keywords: | Internet Explorer, ids | Cc: | |
| Blocking: | Blocked by: |
Description
$('#register') which should only match element(s) with the id set to register, seems to mach tags with name set to register as well in IE6.
Example: <a name="register"></a> ... <form id="register" action="test.html"> ... </form>
Match: $('#register').size() == 1 matched element is the anchor
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

This is a well known issue in IE and the s fix for this in the core would cause severe performance issues.
If your code *must* have both a name and an id of the same value on different elements you could work around it by using the :not expression.
$('#register:not([@name=register])');