Oh I see... it works on every element of the received array separately.. got it! :) Thanks!
On Sun, Jan 30, 2011 at 4:11 PM, Christoph Pojer <[email protected]>wrote: > Well, $$ returns a collection, any Element operation you execute on that > collection returns an array rather than a single value. > > For example: > > $$('div') - returns all divs as array [div, div] > $$('div').getStyle('width') - returns the width of all divs in an array > ['10px', '5px'] > $$('div').getChildren() - returns the children of the divs as array of > arrays [[p, p], [p, span]] > > Similar, $$('div').getFirst() returns an array containing the first child > of every div: - [p, span] > > $$('div > *') - returns the children of all divs in one array [p, p, p, > span] > > $$('div').getChildren().flatten() basically equals $$('div > *') > > -- --- "Make everything as simple as possible, but not simpler." - Albert Einstein
