Difference between revisions of "Team:TUDelft/Notebook"

Line 670: Line 670:
 
             </tr>
 
             </tr>
 
         </table>
 
         </table>
 +
        <br><br>
 
   <h2>Predictable and Transferable Expression</h2>
 
   <h2>Predictable and Transferable Expression</h2>
 +
        <br>
 
             <table id="tabletu" class="notebook">
 
             <table id="tabletu" class="notebook">
 
                 <tr id="category">
 
                 <tr id="category">
Line 924: Line 926:
  
 
     <script>
 
     <script>
        // Get the button that opens the modal
+
      var btn = document.querySelectorAll("button.modal-button");
        var btn = document.querySelectorAll("button.modal-button");
+
var modalTD = document.querySelectorAll(".modalTD") // get modalTD
  
        // All page modals
 
        var modals = document.querySelectorAll('.modal');
 
  
        // Get the <span> element that closes the modal
+
var modals = document.querySelectorAll('.modal');
        var spans = document.getElementsByClassName("close");
+
  
        // When the user clicks the button, open the modal
+
// Get the <span> element that closes the modal
        for (var i = 0; i < btn.length; i++) {
+
var spans = document.getElementsByClassName("close");
            btn[i].onclick = function(e) {
+
                e.preventDefault();
+
                modal = document.querySelector(e.target.getAttribute("href"));
+
                modal.style.display = "block";
+
            }
+
        }
+
  
        // When the user clicks on <span> (x), close the modal
+
// When the user clicks the button, open the modal
        for (var i = 0; i < spans.length; i++) {
+
for (var i = 0; i < btn.length; i++) {
            spans[i].onclick = function() {
+
  btn[i].style.height = modalTD[i].clientHeight + 'px' //set height of outer td to buttons
                for (var index in modals) {
+
  btn[i].onclick = function(e) {
                    if (typeof modals[index].style !== 'undefined') modals[index].style.display = "none";  
+
    e.preventDefault();   
                }
+
    modal = document.querySelector(e.target.getAttribute("href"));
            }
+
    modal.style.display = "block";
        }
+
  }
 +
}
  
        // When the user clicks anywhere outside of the modal, close it
+
// When the user clicks on <span> (x), close the modal
        window.onclick = function(event) {
+
for (var i = 0; i < spans.length; i++) {
            if (event.target.classList.contains('modal')) {
+
  spans[i].onclick = function() {
                for (var index in modals) {
+
    for (var index in modals) {
                    if (typeof modals[index].style !== 'undefined') modals[index].style.display = "none";  
+
      if (typeof modals[index].style !== 'undefined') modals[index].style.display = "none";
                }
+
    }
            }
+
  }
        }
+
}
 +
 
 +
// When the user clicks anywhere outside of the modal, close it
 +
window.onclick = function(event) {
 +
  if (event.target.classList.contains('modal')) {
 +
    for (var index in modals) {
 +
      if (typeof modals[index].style !== 'undefined') modals[index].style.display = "none";
 +
    }
 +
  }
 +
}
  
 
     </script>
 
     </script>

Revision as of 21:04, 1 October 2019

Sci-Phi 29

Orthogonal Replication


Cloning Testing of Plasmid
April
May
June
July
August
September
October


Predictable and Transferable Expression


Cloning Testing of Plasmid
April
May
June
July
August
September
October