Bug Tracker

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#10254 closed bug (duplicate)

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

Change History (5)

comment:1 Changed 12 years ago by Rick Waldron

Component: unfiledcss
Priority: undecidedlow
Status: newopen

comment:2 Changed 12 years ago by mikesherov

this is a dupe of #8388

comment:4 Changed 12 years ago by Timmy Willison

Resolution: duplicate
Status: openclosed

Thanks Mike

comment:5 Changed 12 years ago by Timmy Willison

Duplicate of #8388.

Note: See TracTickets for help on using tickets.