[GetPosition]

-= Ohne Beispiel =-

Diese Codeschnipsel helfen Ihnen dabei, in verschachtelten Strukturen die effektive Position Ihrer Objekte herauszufinden.

[Code]

[in Ihre Scripte]

/* This snippet and many others are available free online at
The JavaScript Source!! http://www.nightfire.ch/java/
Created by: Ultimater :: http://ultimiacian.tripod.com/ */

// To find the left position, add this snippet to your code:


function getPositionLeft(This){
var el = This;var pL = 0;
while(el){pL+=el.offsetLeft;el=el.offsetParent;}
return pL
}

// To find the top position, add this snippet to your code:

function getPositionTop(This){
var el = This;var pT = 0;
while(el){pT+=el.offsetTop;el=el.offsetParent;}
return pT
}

[Autor]

Ultimater

[Download]

Kopieren Sie bitte den Code

Copyright © 1998- Nightfire Webworker Archiv Script No: 653