Skip to content

Instantly share code, notes, and snippets.

@kalenderApp
Created July 10, 2014 09:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kalenderApp/c07c993852b1b779ec23 to your computer and use it in GitHub Desktop.
Save kalenderApp/c07c993852b1b779ec23 to your computer and use it in GitHub Desktop.
var getCursorPositionOfPage = function(e){
var x, y;
e = e || window.event;
x = e.pageX || (e.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft));
y = e.pageY || (e.clientY + (document.documentElement.scrollTop || document.body.scrollTop));
return {
'x':x,
'y':y
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment