Difference between revisions of "Team:Bielefeld-CeBiTec/TEMPLATE"

(Created page with "<html> <style> .firstHeading { display: none; } .mw-content-text { display: none; } .logo_2018 { display: none; } .content { padding: 0px; width: 100%; margin: 0px;...")
 
Line 97: Line 97:
 
}
 
}
 
</style>
 
</style>
 +
 +
<script>
 +
/* Loop through all dropdown buttons to toggle between hiding and showing its dropdown content - This allows the user to have multiple dropdowns without any conflict */
 +
var dropdown = document.getElementsByClassName("dropdown-btn");
 +
var i;
 +
 +
for (i = 0; i < dropdown.length; i++) {
 +
  dropdown[i].addEventListener("click", function() {
 +
this.classList.toggle("active");
 +
var dropdownContent = this.nextElementSibling;
 +
if (dropdownContent.style.display === "block") {
 +
  dropdownContent.style.display = "none";
 +
} else {
 +
  dropdownContent.style.display = "block";
 +
}
 +
  });
 +
}
 +
</script>
  
 
<head>  
 
<head>  

Revision as of 09:16, 26 May 2018