/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function getAbsolutePosition( eElement ) { var oReturn = { x:0, y:0 } while ( eElement != null ) { oReturn.x += oElement.offsetLeft; oReturn.y += oElement.offsetTop; oElement = oElement.offsetParent; } return oReturn; }