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 forcss('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