Difference between revisions of "Template:Virginia"

Line 96: Line 96:
  
 
});
 
});
 +
 +
 +
/*********CHRISTIA'S SCRIPT**********/
 +
 +
var acc = document.getElementsByClassName("accordion");
 +
var i;
 +
 +
for (i = 0; i < acc.length; i++) {
 +
    acc[i].onclick = function(){
 +
        /* Toggle between adding and removing the "active" class,
 +
        to highlight the button that controls the panel */
 +
        this.classList.toggle("active");
 +
 +
        /* Toggle between hiding and showing the active panel */
 +
        var panel = this.nextElementSibling;
 +
        if (panel.style.display === "block") {
 +
            panel.style.display = "none";
 +
        } else {
 +
            panel.style.display = "block";
 +
        }
 +
    }
 +
}
  
  

Revision as of 03:47, 1 November 2017