hide :: Element |
Examples
<div id="error-message"></div>
$('error-message').hide(); // -> HTMLElement (and hides div#error-message)
Backwards compatibility change
In previous versions of Prototype, you could pass an arbitrary number of elements to Element.toggle, Element.show, and Element.hide, for consistency, this is no longer possible in version 1.5!
You can however achieve a similar result by using Enumerables:
['content', 'navigation', 'footer'].each(Element.hide);
// -> ['content', 'navigation', 'footer'] // and displays #content, #navigation and #footer.
or even better:
$('content', 'navigation', 'footer').invoke('hide');
// -> [HTMLElement, HTMLElement, HTMLElement] (#content, #navigation and #footer) // and displays #content, #navigation and #footer.
See also
|
Prototype API 1.5.0 - prototypejs.org