Skip to content

Instantly share code, notes, and snippets.

@padolsey
Created April 8, 2010 12:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save padolsey/360015 to your computer and use it in GitHub Desktop.
Save padolsey/360015 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