On Wed, Feb 3, 2010 at 6:12 PM, Henrik Hansen <[email protected]> wrote:
> I've been working on something similar.
> It's called Array.expose. Let's say that you have an array of
> elements:
>
> a = [el1, el2, el3, ... , eln]
>
> and then call the method expose:
>
> a.expose('set')
>
> then the method Array.set would actually be Array.each(function(x)
> {x.set()}).
> Therefore I can then do this:
>
> a.set('html', 'hello')
>
> Adding some way of using Array.map instead of Array.each might also be
> interesting
As Subtle wrote ...
$$([el1, el2]).set('html', 'hello');
already works in mootools, not to mention:
$$([el1, el2]).get('href');
works too (which behaves like Array.map)
Regards
Rajeev J Sebastian