|
|
Line 25: |
Line 25: |
| | | |
| <p>Below are protocols and notebooks from three wet lab groups. Feel free to download them and take a look.</p> | | <p>Below are protocols and notebooks from three wet lab groups. Feel free to download them and take a look.</p> |
− | | + | <br> |
| <button class="accordion"> PROTOCOLS </button> | | <button class="accordion"> PROTOCOLS </button> |
| <div class="panel"> | | <div class="panel"> |
Line 51: |
Line 51: |
| </div> | | </div> |
| | | |
− | | + | <br> |
| | | |
| | | |
Line 66: |
Line 66: |
| /***************************************************JAVASCRIPT STARTS HERE**************************************************/ | | /***************************************************JAVASCRIPT STARTS HERE**************************************************/ |
| var acc = document.getElementsByClassName("accordion"); | | var acc = document.getElementsByClassName("accordion"); |
− | var close = document.getElementsByClassName("accordion-closer");
| |
− | var inf = document.getElementsByClassName("infographic");
| |
| var i; | | var i; |
| | | |
Line 85: |
Line 83: |
| panel.style.display = "block"; | | panel.style.display = "block"; |
| } | | } |
− | if (panel.style.maxHeight) {
| |
− | panel.style.maxHeight = null;
| |
− | } else {
| |
− | panel.style.maxHeight = panel.scrollHeight + "px";
| |
− | }
| |
− | });
| |
− | }
| |
− | for (i = 0; i < close.length; i++) {
| |
− | close[i].addEventListener("click", function(acc) {
| |
− |
| |
− | this.parentElement.previousElementSibling.classList.toggle("active");
| |
− | var panel = this.parentElement;
| |
− | panel.style.display = "none";
| |
| if (panel.style.maxHeight) { | | if (panel.style.maxHeight) { |
| panel.style.maxHeight = null; | | panel.style.maxHeight = null; |
Line 106: |
Line 91: |
| } | | } |
| | | |
− | //for (i = 0; i < inf.length; i++) {
| |
− | inf[0].addEventListener("click", function() {
| |
− |
| |
− | acc[0].classList.toggle("active");
| |
− | var panel = acc[0].nextElementSibling;
| |
− | if (panel.style.display === "block") {
| |
− | panel.style.display = "none";
| |
− | } else {
| |
− | panel.style.display = "block";
| |
− | }
| |
− | if (panel.style.maxHeight) {
| |
− | panel.style.maxHeight = null;
| |
− | } else {
| |
− | panel.style.maxHeight = panel.scrollHeight + "px";
| |
− | }
| |
− | acc[0].scrollIntoView();
| |
− | });
| |
− |
| |
− | inf[1].addEventListener("click", function() {
| |
− |
| |
− | acc[1].classList.toggle("active");
| |
− | var panel = acc[1].nextElementSibling;
| |
− | if (panel.style.display === "block") {
| |
− | panel.style.display = "none";
| |
− | } else {
| |
− | panel.style.display = "block";
| |
− | }
| |
− | if (panel.style.maxHeight) {
| |
− | panel.style.maxHeight = null;
| |
− | } else {
| |
− | panel.style.maxHeight = panel.scrollHeight + "px";
| |
− | }
| |
− | acc[1].scrollIntoView();
| |
− | });
| |
− |
| |
− | inf[2].addEventListener("click", function() {
| |
− |
| |
− | acc[2].classList.toggle("active");
| |
− | var panel = acc[2].nextElementSibling;
| |
− | if (panel.style.display === "block") {
| |
− | panel.style.display = "none";
| |
− | } else {
| |
− | panel.style.display = "block";
| |
− | }
| |
− | if (panel.style.maxHeight) {
| |
− | panel.style.maxHeight = null;
| |
− | } else {
| |
− | panel.style.maxHeight = panel.scrollHeight + "px";
| |
− | }
| |
− | acc[2].scrollIntoView();
| |
− | });
| |
− |
| |
− | inf[3].addEventListener("click", function() {
| |
− |
| |
− | acc[3].classList.toggle("active");
| |
− | var panel = acc[3].nextElementSibling;
| |
− | if (panel.style.display === "block") {
| |
− | panel.style.display = "none";
| |
− | } else {
| |
− | panel.style.display = "block";
| |
− | }
| |
− | if (panel.style.maxHeight) {
| |
− | panel.style.maxHeight = null;
| |
− | } else {
| |
− | panel.style.maxHeight = panel.scrollHeight + "px";
| |
− | }
| |
− | acc[3].scrollIntoView();
| |
− | });
| |
− |
| |
− | inf[4].addEventListener("click", function() {
| |
− |
| |
− | acc[4].classList.toggle("active");
| |
− | var panel = acc[4].nextElementSibling;
| |
− | if (panel.style.display === "block") {
| |
− | panel.style.display = "none";
| |
− | } else {
| |
− | panel.style.display = "block";
| |
− | }
| |
− | if (panel.style.maxHeight) {
| |
− | panel.style.maxHeight = null;
| |
− | } else {
| |
− | panel.style.maxHeight = panel.scrollHeight + "px";
| |
− | }
| |
− | acc[4].scrollIntoView();
| |
− | });
| |
− |
| |
− | inf[5].addEventListener("click", function() {
| |
− |
| |
− | acc[5].classList.toggle("active");
| |
− | var panel = acc[5].nextElementSibling;
| |
− | if (panel.style.display === "block") {
| |
− | panel.style.display = "none";
| |
− | } else {
| |
− | panel.style.display = "block";
| |
− | }
| |
− | if (panel.style.maxHeight) {
| |
− | panel.style.maxHeight = null;
| |
− | } else {
| |
− | panel.style.maxHeight = panel.scrollHeight + "px";
| |
− | }
| |
− | acc[5].scrollIntoView();
| |
− | });
| |
− | //}
| |
| /***************************************************JAVASCRIPT ENDS HERE****************************************************/ | | /***************************************************JAVASCRIPT ENDS HERE****************************************************/ |
| </script> | | </script> |