Toggle Visibility



This JavaScript-function enables you to toggle the visibility of almost any object of HTML code, having an object id defined, changing from invisible to a display style mode, vice versa.
In this example toggled by a click. It is also possible to use any Event mechanissm like onClick, onMouseOver etc.


Click for change of visibility


%begin html%

Click for change of visibility


Another example:

%begin html%




%begin javascript%
toggleVisibility('object id','display style of visible object');


-- PeterZumbruch - 30 Aug 2007
Topic attachments
I Attachment Action Size Date Who Comment
hideshow.jsjs hideshow.js manage 1.8 K 2007-06-28 - 16:50 PeterZumbruch JavaScript hide and show extended and reduced to necessary
Topic revision: r3 - 2007-08-30, PeterZumbruch
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)