Skip to main content

Bug Tracker

Side navigation

#10254 closed bug (duplicate)

Opened September 12, 2011 01:41PM UTC

Closed October 18, 2011 01:58PM UTC

Last modified October 18, 2011 01:58PM UTC

css("background-image") returns null for new elements in IE7/8

Reported by: jmabey Owned by:
Priority: low Milestone: None
Component: css Version: 1.6.3
Keywords: Cc:
Blocked by: Blocking:
Description

Suppose you create an element with $() and then set its background image. If you then try to retrieve the background image using css() using IE7 and 8, then null is returned. However, its style.backgroundImage property holds the correct value.

  • Test case: http://jsfiddle.net/jmabey/7Ftpc/
  • What happens: IE7 and 8 return null instead of a URL for css('background-image')
  • Expected: css('background-image') should return a URL
  • Reproducible jQuery 1.6.3 and below using IE7 and 8, but works as expected in 1.3.2
  • Works as expected in Firefox 6.0.2, Chrome 13, Opera 11.51 under Ubuntu 11.04, and IE9
  • Not tested in IE6
Attachments (0)
Change History (5)

Changed September 19, 2011 04:14PM UTC by rwaldron comment:1

component: unfiledcss
priority: undecidedlow
status: newopen

Changed October 17, 2011 10:41PM UTC by mikesherov comment:2

this is a dupe of #8388

Changed October 18, 2011 02:45AM UTC by mikesherov comment:3

Changed October 18, 2011 01:58PM UTC by timmywil comment:4

resolution: → duplicate
status: openclosed

Thanks Mike

Changed October 18, 2011 01:58PM UTC by timmywil comment:5

Duplicate of #8388.