Why does jQuery .css('left') and .position().left return different values?

Viewed 56587

The values I'm getting for $(el).css('left') and $(el).position().left are different?

If I go $(el).css('left', '100px'), then $(el).css('left') it returns 110px instead of 100px (yes, it is always 10% more) and if I evaluate $(el).position().left, it gives me 100.

Why does Chrome behave this way? You can see how this would affect jQuery animations using the left property.

I'm using Chrome 21.0.1180.57 on Ubuntu.

EDIT 1: Seems to be only affecting Chrome, FF 14.0.1 is giving me the same values.

2 Answers
Related