Ticket #10843 (closed feature: duplicate)
Consider adding :link to Sizzle
| Reported by: | Christopher Lenz <cmlenz@…> | Owned by: | Christopher Lenz <cmlenz@…> |
|---|---|---|---|
| Priority: | low | Milestone: | 1.next |
| Component: | selector | Version: | 1.7.1rc1 |
| Keywords: | ie6 ie7 | Cc: | |
| Blocking: | Blocked by: |
Description
Using selectors of the type [attrname] to select elements based on the existence of an attribute seems to have broken in IE6 and IE7 with jQuery 1.7. The results include elements even without the attribute.
I've created a fiddle to show the problem:
http://jsfiddle.net/wuRsG/5/
This fails for IE6 and IE7 with jQuery 1.7, but works as expected with jQuery 1.6.4 and earlier versions.
Change History
comment:1 Changed 18 months ago by timmywil
- Owner set to timmywil
- Priority changed from undecided to low
- Status changed from new to assigned
- Component changed from unfiled to selector
- Milestone changed from None to 1.7.2
comment:2 Changed 15 months ago by timmywil
- Milestone changed from 1.7.2 to 1.8
Pushing to 1.8 sizzle rewrite.
comment:3 Changed 12 months ago by dmethvin
- Owner changed from timmywil to Christopher Lenz <cmlenz@…>
- Status changed from assigned to pending
What is the use case for this? We're inclined to close it wontfix but would like to hear if there are really useful cases we're missing.
comment:4 Changed 12 months ago by Christopher Lenz <cmlenz@…>
- Status changed from pending to new
I am using the type of selector primarily for selecting <a> elements that have href attributes, similar to using :link vs. just a in CSS selectors.
Can you suggest an alternative selector for this, or would I need to add markup?
comment:5 Changed 12 months ago by timmywil
- Status changed from new to open
- Type changed from bug to feature
We should consider adding the :link selector
comment:7 Changed 12 months ago by dmethvin
- Keywords ie6 ie7 added
- Summary changed from Has-Attribute-Selector doesn't work correctly with IE6&7 to Consider adding :link to Sizzle
comment:8 Changed 11 months ago by timmywil
- Status changed from open to closed
- Resolution set to duplicate
This has been ported to a more widespread Sizzle issue: https://github.com/jquery/sizzle/issues/44
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

It's strange that this doesn't seem to be working the same way in 1.7. We'll look into this for 1.7.2. http://jsfiddle.net/timmywil/wuRsG/11/