Ticket #5210 (closed bug: duplicate)
css background-position in IE8 returns undefined
| Reported by: | valugi | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.4 |
| Component: | unfiled | Version: | 1.3.2 |
| Keywords: | css, IE8 | Cc: | |
| Blocking: | Blocked by: |
Description
el.css({ 'background-position': "10px 10px"}); set some alert(el.css("background-position")); get the value
In Opera, FF, Chrome, Safari works. Not in IE8.
Change History
comment:2 Changed 4 years ago by dmethvin
- Status changed from new to closed
- Resolution set to duplicate
Duplicate of #4295. Use individual properties not shorthand ones.
comment:3 Changed 18 months ago by buchanans@…
This is not a duplicate of #4295. That ticket deals with shorthand properties, but background-position is not a shorthand property according to the W3C. Some browsers treat it that way, providing the non-standard background-position-x and background-position-y; however, those are not a workable substitute, as Firefox does not support them. This is precisely the kind of inconsistency that jQuery ought to compensate for.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

This is what I did as a workaround. http://stackoverflow.com/questions/1420913/jquery-css-bug-in-ie8