mirror of
https://github.com/gooba42/adventureland.git
synced 2026-10-14 18:39:27 -05:00
Open source
This commit is contained in:
Executable
+18
@@ -0,0 +1,18 @@
|
||||
function getOffset( el ) {
|
||||
var _x = 0;
|
||||
var _y = 0;
|
||||
while( el && !isNaN( el.offsetLeft ) && !isNaN( el.offsetTop ) ) {
|
||||
_x += el.offsetLeft - el.scrollLeft;
|
||||
_y += el.offsetTop - el.scrollTop;
|
||||
el = el.parentNode;
|
||||
}
|
||||
return {top: _y, left: _x};
|
||||
}
|
||||
function dge(x)
|
||||
{
|
||||
return document.getElementById(x);
|
||||
}
|
||||
function pa(x)
|
||||
{
|
||||
return parseInt(x);
|
||||
}
|
||||
Reference in New Issue
Block a user