/[drupal]/contributions/themes/civicspace/scripts/toggle.js
ViewVC logotype

Contents of /contributions/themes/civicspace/scripts/toggle.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Mon Aug 29 21:52:13 2005 UTC (4 years, 2 months ago) by robinmonks
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-6--2, DRUPAL-4-7
Changes since 1.1: +2 -0 lines
File MIME type: text/javascript
Add correct info strings to all files.
1 /* $Id: Exp $ */
2
3 function toggle( targetId ) {
4 if ( document.getElementById ) {
5 target = document.getElementById( targetId );
6 if ( target.style.display == "none" ) {
7 target.style.display = "";
8 } else {
9 target.style.display = "none";
10 }
11 }
12 }
13
14 function toggleShow( targetId ) {
15 if ( document.getElementById ) {
16 target = document.getElementById( targetId );
17 if (target.style.display == "none") {
18 target.style.display = "";
19 }
20 }
21 }
22
23 function toggleHide( targetId ) {
24 if ( document.getElementById ) {
25 target = document.getElementById( targetId );
26 if (target.style.display == "") {
27 target.style.display = "none";
28 }
29 }
30 }
31
32 function toggleAll( targetTag, showHide ) {
33 if ( document.getElementById ) {
34 target = document.getElementsByTagName( targetTag );
35 var i;
36 var max = target.length;
37 if ( showHide == "show" ) {
38 for ( i = 0; i < max; i++ ) {
39 if ( target[ i ].style.display == "none" ) {
40 target[ i ].style.display = "";
41 }
42 }
43 }
44 else if ( showHide == "hide" ) {
45 for ( i = 0; i < max; i++ ) {
46 if ( target[ i ].style.display == "" ) {
47 target[ i ].style.display = "none";
48 }
49 }
50 }
51 }
52 }

  ViewVC Help
Powered by ViewVC 1.1.2