Team:Freiburg/Templates/header

From 2011.igem.org

(Difference between revisions)
Line 8: Line 8:
  url = splitted[1].toLowerCase();
  url = splitted[1].toLowerCase();
  // check is we are in a submenu
  // check is we are in a submenu
-
  if (url.search('/') >= 0){
+
  //if (url.search('/') >= 0){
-
  alert('submenu!');
+
//  alert('submenu!');
-
  splitted = url.split('/');
+
//  splitted = url.split('/');
-
  if(splitted.length > 1){
+
//  if(splitted.length > 1){
-
      var id = 'sub-'+ splitted[0];
+
//    var id = 'sub-'+ splitted[0];
-
      hideSubmenu(id);
+
//    hideSubmenu(id);
-
  }
+
//  }
-
  }
+
  //}
-
  else { // we are on a main menu item
+
  //else { // we are on a main menu item
   var id = 'sub-'+ url;
   var id = 'sub-'+ url;
   hideSubmenu(id);
   hideSubmenu(id);
 +
  highlightMenuItem(id);
 +
//}
}
}
 +
 +
function highlightMenuItem(id){
 +
  .getElementsByTagName('span')[0].style.display="block";
}
}
Line 31: Line 36:
     if( submenus[i] != elem ){
     if( submenus[i] != elem ){
         document.getElementById(submenus[i]).style.display = 'none';
         document.getElementById(submenus[i]).style.display = 'none';
 +
        document.getElementById(id).getElementsByTagName('span')[0].style.display="block";
 +
        document.getElementById(id).getElementsByTagName('span')[1].style.display="block";
     }
     }
     else{
     else{
         document.getElementById(submenus[i]).style.display = 'block';
         document.getElementById(submenus[i]).style.display = 'block';
 +
        document.getElementById(id).getElementsByTagName('span')[0].style.display="block";
 +
        document.getElementById(id).getElementsByTagName('span')[1].style.display="block";
     }
     }
   }
   }
Line 281: Line 290:
.blue {
.blue {
  color:#0CA5B0;
  color:#0CA5B0;
-
}
 
-
.selected{
 
-
color:#FF0000;
 
}
}
.unselected{
.unselected{
Line 307: Line 313:
  <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')"><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="blue" display="none"> < </span>home<span class="blue" display="none"> > </span></a>
                         </li>
                         </li>
-
<li><a href="#" display="block" onclick="hideSubmenu('sub-team')"><span class="unselected"> < </span>team<span class="unselected"> > </span></a>
+
<li><a href="#" display="block" onclick="hideSubmenu('sub-team')"><span class="blue" display="none"> < </span>team<span class="blue" display="none"> > </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 316: Line 322:
                         </ul>
                         </ul>
</li>
</li>
-
<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>
+
<li><a href="https://2011.igem.org/Team:Freiburg/Project" display="block" onclick="hideSubmenu('sub-project')"><span class="blue" display="none"> < </span>project<span class="blue" display="none"> > </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 326: Line 332:
                             <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')"><span class="unselected"> < </span>gallery<span class="unselected"> > </span></a> </li>
+
<li><a href="#"  display="block" onclick="hideSubmenu('none')"><span class="blue" display="none"> < </span>gallery<span class="blue" display="none"> > </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>
+
<li><a href="https://2011.igem.org/Team:Freiburg/Sponsors"  display="block" onclick="hideSubmenu('none')"><span class="blue" display="none"> < </span>sponsors<span class="blue" display="none"> > </span></a> </li>
</ul>
</ul>
  </div>
  </div>
<div id=noNavigationContent>
<div id=noNavigationContent>
</html>
</html>

Revision as of 16:42, 3 July 2011


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