Skip to main content

Bug Tracker

Side navigation

#9351 closed bug (worksforme)

Opened May 19, 2011 09:02PM UTC

Closed July 21, 2011 09:06AM UTC

Last modified November 21, 2013 12:58PM UTC

$('img[src$=.png]') error on IE7 and IE8

Reported by: Owned by:
Priority: undecided Milestone:
Component: selector Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:

This only happens on IE7 and IE8. Not tested on IE9.

Works ok on safari,chrome, FF4.

'''Object doesn't support this property or method

in jquery-1.6.1.js, line 998 character 15'''

Does NOT occur on jquery-1.4.2.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ""><html xmlns=""> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<script type="text/javascript" src="/js/jquery/jquery-1.6.1.js"></script>
<script type="text/javascript">
	$('img[src$=png]');	// this works ok
	$('img[src$=.png]'); 	// this will crash
<img src="whatever.png" alt="" />

Attachments (0)
Change History (7)

Changed May 19, 2011 09:07PM UTC by comment:1

Test under IE7 or IE8:

Changed May 19, 2011 09:53PM UTC by rwaldron comment:2

component: unfiledselector
owner: →
status: newpending

Take a look at the api, there have been some changes made in the last 6 months or so regarding attribute selectors, most notably that jQuery requires quotes around the attribute value of the selector

Changed June 03, 2011 08:09AM UTC by trac-o-bot comment:3

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Changed June 03, 2011 08:13AM UTC by anonymous comment:4

Quoting works.

Updated fiddle showing how to solve it:

Changed July 21, 2011 09:05AM UTC by addyosmani comment:5

resolution: invalid
status: closedreopened

Changed July 21, 2011 09:06AM UTC by addyosmani comment:6

resolution: → worksforme
status: reopenedclosed

Updating status to worksforme as quoting appears to work fine here in both general and as per the submitters test case.

Changed November 21, 2013 12:58PM UTC by anonymous comment:7

#codeErrormsg img[src$=right.png]