Bug Tracker

Modify

Ticket #10254 (closed bug: duplicate)

Opened 22 months ago

Last modified 20 months ago

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:
Blocking: Blocked by:

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

comment:1 Changed 21 months ago by rwaldron

  • Priority changed from undecided to low
  • Status changed from new to open
  • Component changed from unfiled to css

comment:2 Changed 20 months ago by mikesherov

this is a dupe of #8388

comment:4 Changed 20 months ago by timmywil

  • Status changed from open to closed
  • Resolution set to duplicate

Thanks Mike

comment:5 Changed 20 months ago by timmywil

Duplicate of #8388.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.