Matt Foster wrote: > $A() does not accept a collection of elements to extend, this is > clearly stated in the documentation as they give a clean example of > how one can do that, but it does not behave that way by default. What > it does do though, is receive a NodeList object such as a collection > returned by getElementsByTagName and convert it to a regular JS Array, > which is indeed extended, but with prototype's Array methods. > > http://prototypejs.org/api/utility/dollar-a > > Cheers > So if you have a node list you want to extend, use $A() and collect()
$A(nodelist).collect($); - Ken Snyder --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
