Side navigation
#8376 closed bug (invalid)
Opened February 24, 2011 06:26PM UTC
Closed February 24, 2011 07:49PM UTC
Last modified February 25, 2011 09:40AM UTC
ID parent + ID child will not find element in IE 7
Reported by: | rollins.jackson@gmail.com | Owned by: | rollins.jackson@gmail.com |
---|---|---|---|
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!
Attachments (0)
Change History (5)
Changed February 24, 2011 06:27PM UTC by comment:1
component: | unfiled → selector |
---|---|
owner: | → rollins.jackson@gmail.com |
status: | new → pending |
Changed February 24, 2011 06:36PM UTC by comment:2
Changed February 24, 2011 07:49PM UTC by comment:3
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.
Changed February 24, 2011 09:24PM UTC by comment:4
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.
Changed February 25, 2011 09:40AM UTC by comment:5
Replying to [comment:4 rollins.jackson@…]:
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.