Team:Yale/Templates/Yale Header Project

From 2010.igem.org

(Difference between revisions)
Line 210: Line 210:
<script type="text/javascript">  
<script type="text/javascript">  
-
function switchMenu(obj) {
+
<script type="text/javascript">
-
var el = document.getElementById(obj);
+
function switchMenu(item) {
-
if ( el.style.display != 'none' ) {
+
obj=document.getElementById(item);
-
el.style.display = 'none';
+
col=document.getElementById("x" + item);
 +
if (obj.style.display=="none") {
 +
  obj.style.display="block";
 +
  col.innerHTML="[-]";
 +
}
 +
else {
 +
  obj.style.display="none";
 +
  col.innerHTML="[+]";
 +
}
}
}
-
else {
+
</script>
-
el.style.display = '';
+
-
}
+
-
}
+
-
 
+
-
function collapseAll(objs) {
+
-
var i;
+
-
for (i=0;i<objs.length;i++ ) {
+
-
objs[i].style.display = 'none';
+
-
}
+
-
}
+
-
function pageLoad() {
+
-
collapseAll($('monday','myDiv2','myDiv3'));
+
-
}
+
-
addEvent(window,'load',pageLoad);
+
</script>  
</script>  

Revision as of 05:39, 23 October 2010

iGEM Yale