Skip to main content

Bug Tracker

Side navigation

#8019 closed bug (invalid)

Opened January 20, 2011 05:18AM UTC

Closed January 20, 2011 03:09PM UTC

Last modified March 10, 2012 08:06AM UTC

Fix to relative/absolute path issues with IE 7 or less

Reported by: Owned by:
Priority: low Milestone:
Component: selector Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:

This is not really a bug but rather a workaround for the bug mentioned in the summary. Instead of using for example $("img[src='img/cal.gif']") which blows up in IE 7 or less, use $("img[src$='img/cal.gif']"). Quick fix that seems to work across all browsers.

Attachments (0)
Change History (1)

Changed January 20, 2011 03:09PM UTC by jitter comment:1

component: unfiledselector
priority: undecidedlow
resolution: → invalid
status: newclosed

Thanks for taking the time to contribute to the jQuery project!

If I didn't understand something wrong, this indeed is a "bug" in IE which can be worked around in the way you describe. But this workaround needs to be applied when appropriate and cannot be included in jQuery core because you can't just rewrite all [src='...'] selectors to [src$='...'] in IE because that might still end up selecting the wrong elements if there are multiple paths with the same ending.

Closing this as invalid as it's not really a bug.