Here you go:
<http://prototypejs.org/api/enumerable/find>
A really simple example would be:
[1, 2, 3].find(function(item) {
return item == 2;
});
// returns 2 :)
On 19/11/2007, James Kewageshig <[EMAIL PROTECTED]> wrote:
>
> EDIT: here's the only working example I have been able to find, but
> still can't figure it out, I need an array of found elements:
>
> Form.getInputs('myform','radio','type').find(function(radio) { return
> radio.checked; }).value;
>
>
> On Nov 19, 5:54 pm, James Kewageshig <[EMAIL PROTECTED]>
> wrote:
> > Hi All,
> >
> > Sorry if this is the wrong group, but where can I find API info on the
> > find() method in prototype.js?
> >
> > I tried searching, but it keeps getting filtered to 'find' with a ton
> > of junk.
> >
> > thanks.
> >
>
--
burnfield.com/martin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---