The current (1.4.0) implementation supplies two functions: Element.show and Element.hide. Element.hide sets style.display to 'none', whereas show sets it to . It would be better to save to original value of style.display and restore it latter.
see attach patch:
Index: C:/Dokumente und Einstellungen/fra/workspace/Prototype/src/dom.js
===================================================================
--- Prototype/src/dom.js (revision 3595)
+++ Prototype/src/dom.js (working copy)
@@ -28,14 +28,16 @@
hide: function() {
for (var i = 0; i < arguments.length; i++) {
var element = $(arguments[i]);
+ element.styleDisplay = element.style.display;
element.style.display = 'none';
+ element.styleDisplay = undefined;
}
},
show: function() {
for (var i = 0; i < arguments.length; i++) {
var element = $(arguments[i]);
- element.style.display = '';
+ element.style.display = element.styleDisplay || '';
}
},