Posted By


otaqui on 02/08/08

Statistics


Viewed 523 times
Favorited by 0 user(s)

getAbsolutePosition


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function getAbsolutePosition( eElement )
  2. {
  3. var oReturn = { x:0, y:0 }
  4. while ( eElement != null )
  5. {
  6. oReturn.x += oElement.offsetLeft;
  7. oReturn.y += oElement.offsetTop;
  8. oElement = oElement.offsetParent;
  9. }
  10. return oReturn;
  11. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.