Ticket #9955 (closed bug: worksforme)
Attribute selector with innerHTML and quotes
| Reported by: | kapouer@… | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | None |
| Component: | attributes | Version: | 1.5.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Having : <p><span class="test">123</span></p> in the document, these won't select it : $('span[innerHTML="123"]') but this would : $('span[innerHTML=123]') The documentation says it should be quoted. The working case does not match the documentation.
Both of these work : $('p > span').filter('[innerHTML="123"]') $('p > span').filter('[innerHTML=123]')
But both of these don't : $('p > span.test').filter('[innerHTML="123"]') $('p > span.test').filter('[innerHTML=123]')
Latest line used to work in jquery 1.4.2.
If innerHTML used for attribute selector is unsupported, please clearly state it in the documentation.
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.

innerHTML is not an attribute; it was by coincidence that it ever worked