Skip to content

Instantly share code, notes, and snippets.

@codecaffeine
Created January 21, 2011 15:40
Show Gist options
  • Save codecaffeine/789854 to your computer and use it in GitHub Desktop.
Save codecaffeine/789854 to your computer and use it in GitHub Desktop.
Idea. I'm not sure if this'll even work
function findPos(obj) {
var curleft = curtop = 0;
if (obj.offsetParent) {
do {
curleft += obj.offsetLeft;
curtop += obj.offsetTop;
} while (obj = obj.offsetParent);
}
return [curleft,curtop];
}
function sendClick() {
location.href="app-moved://" + findPos(this);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment