#9955 closed bug (worksforme)
Attribute selector with innerHTML and quotes
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | attributes | Version: | 1.5.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
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 (3)
comment:1 Changed 12 years ago by
Component: | unfiled → attributes |
---|---|
Priority: | undecided → low |
Resolution: | → worksforme |
Status: | new → closed |
comment:3 Changed 12 years ago by
I don't think we need to add a specific mention for this in the docs. Since innerHTML
is not an attribute, it was never valid even though it may have worked in the past.
innerHTML is not an attribute; it was by coincidence that it ever worked