Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#8376 closed bug (invalid)

ID parent + ID child will not find element in IE 7

Reported by: rollins.jackson@… Owned by: rollins.jackson@…
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 9 years ago by Rick Waldron

Component: unfiledselector
Owner: set to rollins.jackson@…
Status: newpending

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.

comment:3 Changed 9 years ago by jitter

Priority: undecidedlow
Resolution: invalid
Status: pendingclosed

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 Changed 9 years ago by 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.

comment:5 in reply to:  4 Changed 9 years ago by jitter

Replying to 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.


How to report bugs

Note: See TracTickets for help on using tickets.