-= Ohne Beispiel =-
[Beschreibung]
Diese Codeschnipsel helfen Ihnen dabei, in verschachtelten Strukturen die effektive Position Ihrer Objekte herauszufinden.
[Kompatibilität]
[Code]
/* 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 }
Ultimater
Kopieren Sie bitte den Code