Difference between revisions of "Template:WashU StLouis"

(Added CSS and Javascript for collapsable protocol divs)
m (Change margin from old menu)
Line 169: Line 169:
 
.content_wrapper {
 
.content_wrapper {
 
width: 85%;
 
width: 85%;
margin-left:150px;
+
//margin-left:150px;
 
padding:10px 0px;  
 
padding:10px 0px;  
 
float:left;  
 
float:left;  
Line 498: Line 498:
  
  
<script>
 
  
// Function for collapsable protocols
 
 
var acc = document.getElementsByClassName("protocol-accordion");
 
var i;
 
var j;
 
for (i = 0; i < acc.length; i++) {
 
 
    acc[i].onclick = function(){
 
        this.classList.toggle("active");
 
this.nextElementSibling.classList.toggle("show");
 
        for (j = 0; j < acc.length; j++) {
 
        if ( this!=acc[j] ) {
 
 
            acc[j].classList.remove("active");
 
            acc[j].nextElementSibling.classList.remove("show");       
 
        }
 
 
        }
 
  }
 
}
 
</script>
 
  
  

Revision as of 17:10, 15 June 2016