Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#9955 closed bug (worksforme)

Attribute selector with innerHTML and quotes

Reported by: [email protected] 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 Rick Waldron

Component: unfiledattributes
Priority: undecidedlow
Resolution: worksforme
Status: newclosed

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

comment:2 Changed 12 years ago by [email protected]

By jove !

I bet i'm not the only one using it...

comment:3 Changed 12 years ago by dmethvin

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.

Note: See TracTickets for help on using tickets.