Wednesday, 15 February 2012

javascript - Getting a uniform OFFSET().TOP from transformed element -



javascript - Getting a uniform OFFSET().TOP from transformed element -

i'm retrieving text ajax feeds tile content changes every 5 seconds. tile's height variable need offset between text , element set right height text. (let's it's tile feeds facebook statuses , have create sure doesn't come on top of absolute-positioned element @ bottom.

here, codepen example: http://codepen.io/anon/pen/kfsif (test in webkit, open console)

what happens that, element beingness transformed, different offset (should same), ranging (in example) 62.1875 47.24595642089844. 5 pixels lot in case.

my question is: there way obtain offset().top (or position().top) of element beingness transformed gives me consistent result?

thanks in advance.

edit:

this illustration of how final markup looks like: http://jsfiddle.net/n3kvj/

imagine i'm trying set .medium height doesn't touch .bottom. problem is: .tile height variable , position i'm getting changes during transform.

javascript css3 transform offset

No comments:

Post a Comment