Guest User

Untitled

a guest
May 16th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. function getOffset( element ){
  2. var rect = element.getBoundingClientRect();
  3.  
  4. return {
  5. top: rect.top + window.pageYOffset,
  6. left: rect.left + window.pageXOffset,
  7. };
  8. }
Add Comment
Please, Sign In to add comment