Bug Tracker

Modify

Ticket #3667 (closed bug: duplicate)

Opened 4 years ago

Last modified 4 years ago

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 )

return this[0] && jQuery[ type
"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

comment:4 Changed 4 years ago by brandon

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

duplicate of #3667

comment:5 Changed 4 years ago by moneal

The ticket is a duplicate of itself?

comment:6 Changed 4 years ago by brandon

it is actually duplicate of #3732.

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.