If that's your goal, use Element.Position.js from -more. That's what it's
for. Example:

http://review.mootools.net:9876/test/?project=more&path=/Element/Element.Position_(basic).html

On Thu, Sep 16, 2010 at 11:00 AM, Andrea Dessì <[email protected]> wrote:

> Thank you Aaron for these details :)
>
> What I have to do is to move elements relative to another one....
> so I've thought the easiest way were to compare their "position"
>  in the real window space :) ...with a simple expressions.
>
> I've tried element.getPosistion(window) and is working good with
> chrome, firefox, ie7 and ie8.
>
> Are thery Any bad behaviour with getPosition(window)?
>
> Andrea
>
>
> On Thu, Sep 16, 2010 at 18:54, Aaron Newton <[email protected]> wrote:
>
>> getPosition defaults to finding the position relative to the element's
>> offset parent. If you want to get it relative to the entire document, you
>> have to use getPosition(document.body) (window also appears to work).
>>
>> Getting the position relative to some arbitrary element is much more
>> difficult. See Element.Position.js in MooTools More for an example.
>>
>
>

Reply via email to