I need to get the current position(top, left) of an element before I set it to absolute position .
doing this :
var left = $(element).position().left;
$(element).css({'position':'absolute'});
left will allways be 0 . But the initial position is not 0 . If i don't use the css() method to set absolute position , left is returning the right left position . Any ideea about how to resolve this issue ?
P.S. : Before answerng , this bug was also posted on jquery bug tracker. But noone answered there neither . Read carefully my question . I'm not asking how to get the position , I'm asking why do I get the same position for any set of elements Jquery bug link. It's normal to get same position for all elements after you set them to absolute , not before . Or am I wrong ?
Overcode :
If you're trying to get it's css defined left position, use\n\nvar left = parseInt($element.css(\"left\"));\n\n\nIf you're trying to get it's position relative to the document, use\n\nvar left = $element.offset().left;\n",
2013-09-20T16:20:51