Well if you just want to condense it, you can use Enumerable#select.
divs.invoke('hide').select(function(div){ return div.id == section_id;
}).show();
You can fetch the element that fired an event with event.element()
instead of Event.element(event);
-justin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---