Difference between revisions of "Team:RUM-UPRM/Notebook"

Line 86: Line 86:
 
</div>
 
</div>
  
 
<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 content = this.nextElementSibling;
 
    if (content.style.maxHeight){
 
      content.style.maxHeight = null;
 
    } else {
 
      content.style.maxHeight = content.scrollHeight + "px";
 
    }
 
  });
 
}
 
</script>
 
  
 
<script>
 
<script>
Line 111: Line 95:
 
     this.classList.toggle("active");
 
     this.classList.toggle("active");
 
     var content = this.nextElementSibling;
 
     var content = this.nextElementSibling;
     if (content.style.maxHeight){
+
     if (content.style.display === "block") {
       content.style.maxHeight = null;
+
       content.style.display = "none";
 
     } else {
 
     } else {
       content.style.maxHeight = content.scrollHeight + "px";
+
       content.style.display = "block";
     }  
+
     }
 
   });
 
   });
 
}
 
}

Revision as of 02:48, 23 October 2020

Lab Protocols

Copyright © UPRM-RUM 2020