Ticket #3667 (closed bug: duplicate)
Getting "background-position" on Firefox 2.0.0.18 (and olders)
| Reported by: | rickgbw | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.3 |
| Component: | core | Version: | 1.2.6 |
| Keywords: | Cc: | rickgbw | |
| Blocking: | Blocked by: |
Description
When I want the Background Position of one element, the correct CSS name for this atribute is "background-position".
So, on FF2 when I put: $("#elem").css("background-position"); ... it returns undefined, but works fine if I use "backgroundPosition".
By the way, on FF3, using "background-position" works right.
I think that is important works the CSS property with the correct name (background-position).
Change History
comment:1 Changed 4 years ago by flesler
- Cc rickgbw added
- Owner flesler deleted
- Component changed from unfilled to core
comment:2 Changed 4 years ago by sanaell
function attr: in core.js seems to handle this problem change if ( value === undefined )
| "attr" ]( this[0], name); |
* for
if ( value === undefined ) {
var camelCase = name.replace(/\-(\w)/g, function(all, letter){
return letter.toUpperCase();
});
return this[0] && jQuery[ type "attr" ]( this[0], camelCase ); }
* you will see that fix (i guess), that fix under internet explorer :)
comment:3 Changed 4 years ago by moneal
FF2 only seems to work if it has been set with jQuery. Not if its been set with a external style sheet. Works fine with FF3
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
