Note that the reason for removal of support for this is that the
Element methods
return the element for chaining methods.
If you prefer, you can have your own little helper method for this
(untested code!):
function hideElements(){
$A(arguments).each(Element.hide);
}
then you can use:
<a href="#" onclick="hideElements('basicinfo',
'canposition','canskill'); return false;">
Personally, I prefer calling the .each construct directly, as in
Martin's reply.
best,
Thomas
Am 03.12.2006 um 15:19 schrieb Martin Ström:
>
> See my erlier reply today on how to make your local code work with
> multiple arguments. The multiple argument support is removed in the
> latest prototype version so you should use this style instead:
>
> ['element1', 'element2', 'elemen3'].each(Element.hide);
>
> On 11/28/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>> I posted earlier about this but think google groups was screwed up.
>>
>> Anyway, I'm trying to get multiple elements to hide and it doesn't
>> appear to be working correctly.
>>
>> <a href="#" onclick="Element.hide('basicinfo',
>> 'canposition','canskill'); return false;">
>>
>> I've tried a few variations and none seem to work correctly. At one
>> point I had 'display: none;
>> which helped, but the above code is one of 4 tabs.. It seemed when I
>> got to 3 and 4 things got screwed up with elements not hiding and
>> multiple divs showing up.
>>
>> TIA
>> Stuart
>>
>>
>>>
>>
>
>
> --
> burnfield.com/martin
>
> >
--
Thomas Fuchs
wollzelle
http://www.wollzelle.com
questentier on AIM
madrobby on irc.freenode.net
http://www.fluxiom.com :: online digital asset management
http://script.aculo.us :: Web 2.0 JavaScript
http://mir.aculo.us :: Where no web developer has gone before
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---