Difference between revisions of "Team:Imperial College/Templates/NavBar"

Line 6: Line 6:
 
     integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
 
     integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
  
 +
<script>
  
 +
    var coll = document.getElementsByClassName("collapsible");
 +
    var i;
 +
   
 +
    for (i = 0; i < coll.length; i++) {
 +
        coll[i].addEventListener("click", function() {
 +
            this.classList.toggle("active");
 +
            var drop = this.nextElementSibling;
 +
            if (drop.style.display === "block") {
 +
                drop.style.display = "none";
 +
            } else {
 +
                drop.style.display = "block";
 +
            }
 +
        });
 +
    }
 +
=
 +
 
 +
 +
</script>
 
<style>
 
<style>
  

Revision as of 20:55, 1 October 2018