Team:Yale/Templates/Yale Header Project

From 2010.igem.org

(Difference between revisions)
Line 209: Line 209:
<!------------------- Some Javascript ---------------->
<!------------------- Some Javascript ---------------->
-
<script type="text/javascript">
+
function switchMenu(a){
-
function switchMenu(obj) {
+
  var e=document.getElementById(a);
-
var el = document.getElementById(obj);
+
  if(!e)return true;
-
if ( el.style.display != "none" ) {
+
  if(e.style.display=="none"){
-
el.style.display = 'none';
+
    e.style.display="block"
-
}
+
  } else {
-
else {
+
    e.style.display="none"
-
el.style.display = '';
+
  }
-
}
+
  return true;
}
}
-
</script>
 
<!------------ End Javascript ----------------->
<!------------ End Javascript ----------------->

Revision as of 05:30, 23 October 2010

iGEM Yale function switchMenu(a){ var e=document.getElementById(a); if(!e)return true; if(e.style.display=="none"){ e.style.display="block" } else { e.style.display="none" } return true; }