Side navigation
#11634 closed bug (invalid)
Opened April 24, 2012 02:23PM UTC
Closed April 24, 2012 07:25PM UTC
Last modified April 25, 2012 02:14PM UTC
$("td[innerHTML='xyz']"). no longer works
Reported by: | Geoffrey.Oliver@wpafb.af.mil | Owned by: | Geoffrey.Oliver@wpafb.af.mil |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | selector | Version: | 1.7 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
in jQuery 1.6.4, I could use the selector $("td[innerHTML='xyz']") to filter on all table cells in the DOM with 'xyz' as their inner HTML value. No matter what I try, this selector does not work in 1.7+. I have read the release notes and can't find anything that references why this won't work anymore.
Attachments (0)
Change History (6)
Changed April 24, 2012 03:18PM UTC by comment:1
component: | unfiled → selector |
---|---|
owner: | → Geoffrey.Oliver@wpafb.af.mil |
priority: | undecided → low |
status: | new → pending |
Changed April 24, 2012 07:05PM UTC by comment:2
status: | pending → new |
---|
I added a test case on jsFiddle...
The test case works with 1.6.4 but not with anything newer (including jQuery edge).
Changed April 24, 2012 07:25PM UTC by comment:3
resolution: | → invalid |
---|---|
status: | new → closed |
innerHTML
is a DOM Node property, not an HTML markup attribute. This may have worked, but only by coincidence.
Changed April 24, 2012 07:28PM UTC by comment:4
The correct way to select nodes based on their contents is with :contains(), see: http://jsfiddle.net/rwaldron/VnRuU/5/
Changed April 25, 2012 11:51AM UTC by comment:5
How 'bout that. Thanks for the update. I had found the original example somewhere on the web months ago and had been using it ever since not realizing it wasn't a qualified feature.
Changed April 25, 2012 02:14PM UTC by comment:6
You're welcome! :)
Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket!
Additionally, be sure to test against the "jQuery (edge)" version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/
Open the link and click to "Fork" (in the top menu) to begin.