Ah, yes. I remember I've read this somewhere, but I cannot find it
again.
Anyway, thanks guys!

On Feb 23, 3:47 pm, Christoph Pojer <[email protected]> wrote:
> This is because you are operating on an element collection.
>
> getChildren (and lots of others) return a collection ('Elements' in
> MooTools) which is an array-like-object containing the elements. If you
> execute an Element method on it (setStyle, set.. or getPosition) it will
> call the methods on all elements in the array. If those methods have return
> values other than the element itself, they will be in-place instead of the
> element.
>
> Example:
> var elements = element.getChildren();
> // [p, span]
> elements.set('text', 'test');
> // returns again, [p, span]
> elements.getStyle('color');
> // returns an array [#fff, #000] for example.

Reply via email to