Ticket #3922 (closed bug: invalid)
Attribute Selectors Don't Work E[@attr=value]
| Reported by: | jack_indigo | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.3.1 |
| Component: | core | Version: | 1.3 |
| Keywords: | selector attribute | Cc: | |
| Blocking: | Blocked by: |
Description
There's a 1.3 bug with the selector-by-attribute technique like:
Let's say I have a DIV id=something and inside there's a hyperlink with id=43332, and I want to use the following code to hide it:
$('#something A[@id=43332]').hide();
This used to work with 1.2.6. But not with 1.3. Instead, I get a syntax error that the item cannot be found.
So, I removed the #something out to test, and again, the same error.
I switched back to jQuery 1.2.6 and the problem was resolved.
Note I'm on FF3 on Ubuntu Linux 8.04, whether that has anything to do with this.
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.

The @ sign in the attribute selector syntax is deprecated in version 1.2.6 and was removed in version 1.3.
Just leave the @ sign ouf of the selector.