Skip to content

Instantly share code, notes, and snippets.

@lanqy
Forked from padolsey/gist:360015
Created May 4, 2012 20:33
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 lanqy/2597567 to your computer and use it in GitHub Desktop.
Save lanqy/2597567 to your computer and use it in GitHub Desktop.
var x,y;
document.onmousemove = function(e){
e = e || window.event;
x = e.clientX;
y = e.clientY;
};
function elementAtMousePosition() {
return document.elementFromPoint(x,y);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment