First of all, it's Element.hide (lowercase)
Second, there's a special enumerable method for invoking a method on a
collection of elements -  http://prototypejs.org/api/enumerable/invoke
invoke 
Third, there's no need for $A, since previousSiblings() extends elements
automatically.

Something like this ahould do it:

function hideMenus() {
  $('Links_Sub').previousSiblings().invoke('hide');
}

P.S. In my recent post I explain how to solve such common thing as iterating
over menu items. 
http://thinkweb2.com/projects/prototype/2007/08/28/extending-the-limits/
Hope it helps 

-- 
View this message in context: 
http://www.nabble.com/Prototype-Iterator-tf4388742.html#a12513729
Sent from the RubyOnRails Spinoffs mailing list archive at Nabble.com.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to