#8376 closed bug (invalid)
ID parent + ID child will not find element in IE 7
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | selector | Version: | 1.5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
At work I had the following:
$('#parentId #childId')[0] for a unique situation. This worked fine on ALL browsers (mac and pc) except for IE 7 which would return no element.
As a work around, I changed the child id to #parentId-childId which fixed the issue. I'm sure this is a very small case, but figured I would report regardless.
Thanks for a great product!
Change History (5)
comment:1 Changed 12 years ago by
Component: | unfiled → selector |
---|---|
Owner: | set to [email protected]… |
Status: | new → pending |
comment:3 Changed 12 years ago by
Priority: | undecided → low |
---|---|
Resolution: | → invalid |
Status: | pending → closed |
Your test case is invalid. Don't use document.write
to do debugging, your first call overwrites the original contents of the document. Check https://developer.mozilla.org/en/document.write or google on how/what document.write
does.
This test case works just fine for me.
comment:4 follow-up: 5 Changed 12 years ago by
I fully accept the zing on using document.write (an ignorant screw up on my part).
So I've moved to the actual project. The following will work in all browsers except for IE7 (make sure IE9 is not installed on the same machine either).
http://mediajackagency.com/clients/lakewood/a-space-slider/test.html
The fix was to concat the ids into one. We're using two ideas in the first place because that helps with the flash fallback in IE.
As I mentioned earlier, the margin for scripters actually running into this error is insanely small. However, I decided to ticket it regardless.
comment:5 Changed 12 years ago by
Replying to [email protected]…:
I fully accept the zing on using document.write (an ignorant screw up on my part).
So I've moved to the actual project. The following will work in all browsers except for IE7 (make sure IE9 is not installed on the same machine either).
http://mediajackagency.com/clients/lakewood/a-space-slider/test.html
The fix was to concat the ids into one. We're using two ideas in the first place because that helps with the flash fallback in IE.
As I mentioned earlier, the margin for scripters actually running into this error is insanely small. However, I decided to ticket it regardless.
I again need to ask you to please submit a reduced test case. That link contains way too much code and dependencies to figure out what's going on.
Thanks for taking the time to contribute to the jQuery project! Please provide a reduced jsFiddle test case to help us assess your ticket!
Additionally, test against the jQuery 0 GIT version to ensure the issue still exists.