Bug Tracker

Opened 14 years ago

Closed 12 years ago

#5040 closed bug

Selector #foo a[href=#x/y] fails in IE7

Reported by: michaelmayer Owned by: michaelmayer
Priority: critical Milestone: 1.4
Component: selector Version: 1.3.2
Keywords: selector, internet explorer, ie7 Cc:
Blocked by: Blocking:


As described in the summary, $('#foo a[href=#bar/xyz]') returns no elements in IE7, whereas it works as expected with Safari 4 and Firefox 3.5. I could not test it with IE8. It also returns elements, if I change it to $('#foo a:last') for example, so it finds anchor elements, just the attribute selector seems broken for Internet Explorer.

There was a similar bug with input[for=bar], which was broken for IE in jQuery 1.3. See #3794.

Change History (2)

comment:1 Changed 12 years ago by snover

Owner: changed from john to michaelmayer
Status: newpending

Be aware that elements generated in IE using innerHTML, .html(html), or $(html) with a href attribute will have the href attribute mangled into an absolute path in IE<8, and there is no way that we can really work around that.

If this is still a problem in current versions of jQuery, and you are not creating the elements using one of the previously mentioned methods, please submit a reduced test case. Thanks!

comment:2 Changed 12 years ago by trac-o-bot

Status: pendingclosed

Automatically closed due to 14 days of inactivity.

Note: See TracTickets for help on using tickets.