Ticket #7445 (closed bug: invalid)
attribute selector not support attribute name with '$'
| Reported by: | jiajw0426@… | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.5 |
| Component: | unfiled | Version: | 1.4.3 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Change History
comment:2 Changed 3 years ago by anonymous
i have escape the $ with two backslash,you can see in the bug Description.
comment:3 Changed 3 years ago by jitter
It looks like the reporter forgot to escape the double backslash. As \\ means line break in Trac formatting. So I guess where the linebreaks are the reporter typed \\.
What I don't understand is what the reporter actually reports. The selector documentation explicitly states that you need to double-escape the meta characters in the documentation.
test case that shows we can select by attributes named $sw and that the escaping works as required/documented
comment:4 Changed 3 years ago by jiajw0426@…
I know the test case can run rightly on google chrome,firefox and ie。but i write the same test case in my computer ,it shows that you can not select by attributes named $sw on ie8.
comment:5 Changed 3 years ago by jitter
When I run the test case I linked to in IE 8 it works as expected. Can you provide a test case on http://jsfiddle.net which doesn't work in IE8?
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Thanks for the report but this is not a jQuery bug. $sw is not valid in the name part of a CSS attribute selector. You must escape the $. In the future, please use the jQuery Forum for support requests.