Modify ↓
Ticket #368 (closed bug: wontfix)
attribute selector not working in IE6 in jQuery 1.0.3
| Reported by: | tdeater@… | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | core | Version: | |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Using this selector to find null links in my #nav container:
$("#nav a[@href='#']")
This works fine for all tested browsers using the 2006-08-31 (rev 249) release of jQuery.
In the 1.0.3 release however, IE selects zero elements. Firefox 1.5 works correctly still.
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 caused by IE messing with the attribute value when using getAttribute on the a tag's href attribute. Instead please use:
$("#nav a[@href$='#'");
See http://jquery.com/docs/Base/Expression/CSS/ for more info on this selector.