Difference between revisions of "Team:UCSC/NavBar"

Line 41: Line 41:
 
       <li><a href="https://2018.igem.org/Team:UCSC/Parts">Parts</a></li>
 
       <li><a href="https://2018.igem.org/Team:UCSC/Parts">Parts</a></li>
 
       <li><a href="https://2018.igem.org/Team:UCSC/Notebook">Notebook</a></li>
 
       <li><a href="https://2018.igem.org/Team:UCSC/Notebook">Notebook</a></li>
 +
    </ul>
 +
    </div>
 +
 +
    <div class="dropdown">
 +
    <a href="javascript:void(0);" class="dropbtn dropdown-icon" onclick="toggleDropdownParts()">Parts
 +
      <i class="fa fa-caret-down"></i>
 +
    </a>
 +
    <ul class="dropdown-content" id="ddParts">
 +
      <li><a href="https://2018.igem.org/Team:UCSC/Parts">Overview</a></li>
 +
      <li><a href="https://2018.igem.org/Team:UCSC/Basic_Part">Basic Parts</a></li>
 +
      <li><a href="https://2018.igem.org/Team:UCSC/Composite_Part">Composite Parts</a></li>
 +
      <li><a href="https://2018.igem.org/Team:UCSC/Part_Collection">Part Collection</a></li>
 
     </ul>
 
     </ul>
 
     </div>
 
     </div>
Line 98: Line 110:
 
   if ($(window).width() <= 800) {
 
   if ($(window).width() <= 800) {
 
   var x = document.getElementById("ddHumanPractices");
 
   var x = document.getElementById("ddHumanPractices");
 +
  if (x.className === "dropdown-content") {
 +
      x.className += "show";
 +
  } else {
 +
      x.className = "dropdown-content";
 +
  }
 +
  }
 +
}
 +
 +
function toggleDropdownParts() {
 +
  if ($(window).width() <= 800) {
 +
  var x = document.getElementById("ddParts");
 
   if (x.className === "dropdown-content") {
 
   if (x.className === "dropdown-content") {
 
       x.className += "show";
 
       x.className += "show";

Revision as of 17:09, 18 July 2018