Team:Freiburg/Templates/header

From 2011.igem.org

(Difference between revisions)
Line 2: Line 2:
<head>
<head>
<script type="text/javascript">
<script type="text/javascript">
-
function hideSubmenu( elem , thisElem){
+
function windowLoadMenu(){
  var url = document.URL;
  var url = document.URL;
  var splitted = new Array();
  var splitted = new Array();
Line 8: Line 8:
  url = splitted[1];
  url = splitted[1];
  // check is we are in a submenu
  // check is we are in a submenu
 +
if (url.search('/') >= 0){
 +
  alert('submenu!');
 +
}
 +
else { // we are on a main menu item
 +
  var id = 'sub-'+ url;
 +
  hideSubmenu(id);
 +
}
 +
}
-
alert(url.search('/'));
+
function hideSubmenu( elem ){
  var submenus= ['sub-team','sub-project'];
  var submenus= ['sub-team','sub-project'];
  for( var i=0; i<submenus.length; i++){
  for( var i=0; i<submenus.length; i++){
Line 27: Line 35:
window.onload = function() {  
window.onload = function() {  
-
  hideSubmenu('sub-home', null);
+
  windowLoadMenu();
  document.getElementById( "contentSub" ).style.display="none";
  document.getElementById( "contentSub" ).style.display="none";
  document.getElementsByTagName( "p" )[0].style.display="none";
  document.getElementsByTagName( "p" )[0].style.display="none";
Line 294: Line 302:
  <div id=navigation style="width: 150px; float:left">
  <div id=navigation style="width: 150px; float:left">
<ul>
<ul>
-
<li><a href="https://2011.igem.org/Team:Freiburg/test" display="block" onclick="hideSubmenu('none', this)"><span class="unselected"> < </span>home<span class="unselected"> > </span></a>
+
<li><a href="https://2011.igem.org/Team:Freiburg/test" display="block" onclick="hideSubmenu('none')"><span class="unselected"> < </span>home<span class="unselected"> > </span></a>
                         </li>
                         </li>
-
<li><a href="#" display="block" onclick="hideSubmenu('sub-team', this)"><span class="unselected"> < </span>team<span class="unselected"> > </span></a>
+
<li><a href="#" display="block" onclick="hideSubmenu('sub-team')"><span class="unselected"> < </span>team<span class="unselected"> > </span></a>
<ul class="sub2" id="sub-team" display="none">
<ul class="sub2" id="sub-team" display="none">
                             <li class="sub2"><a href="#"> <span class="blue"> &rarr; </span>members</a></li>
                             <li class="sub2"><a href="#"> <span class="blue"> &rarr; </span>members</a></li>
Line 303: Line 311:
                         </ul>
                         </ul>
</li>
</li>
-
<li><a href="https://2011.igem.org/Team:Freiburg/Project" display="block" onclick="hideSubmenu('sub-project', this)"><span class="unselected"> < </span>project<span class="unselected"> > </span></a>
+
<li><a href="https://2011.igem.org/Team:Freiburg/Project" display="block" onclick="hideSubmenu('sub-project')"><span class="unselected"> < </span>project<span class="unselected"> > </span></a>
                         <ul class="sub2" id="sub-project" display="none">
                         <ul class="sub2" id="sub-project" display="none">
                             <li class="sub2"><a href="#"><span class="blue"> &rarr; </span>overview</a></li>
                             <li class="sub2"><a href="#"><span class="blue"> &rarr; </span>overview</a></li>
Line 313: Line 321:
                             <li class="sub2"><a href="#"><span class="blue"> &rarr; </span>safety</a></li>
                             <li class="sub2"><a href="#"><span class="blue"> &rarr; </span>safety</a></li>
                         </ul> </li>
                         </ul> </li>
-
<li><a href="#"  display="block" onclick="hideSubmenu('none', this)"><span class="unselected"> < </span>gallery<span class="unselected"> > </span></a> </li>
+
<li><a href="#"  display="block" onclick="hideSubmenu('none')"><span class="unselected"> < </span>gallery<span class="unselected"> > </span></a> </li>
-
<li><a href="https://2011.igem.org/Team:Freiburg/Sponsors"  display="block" onclick="hideSubmenu('none', this)"><span class="unselected"> < </span>sponsors<span class="unselected"> > </span></a> </li>
+
<li><a href="https://2011.igem.org/Team:Freiburg/Sponsors"  display="block" onclick="hideSubmenu('none')"><span class="unselected"> < </span>sponsors<span class="unselected"> > </span></a> </li>
</ul>
</ul>
  </div>
  </div>
<div id=noNavigationContent>
<div id=noNavigationContent>
</html>
</html>

Revision as of 15:34, 3 July 2011


This is the wiki page
of the Freiburger student
team competing for iGEM 2011.
Thank you for your interest!