function toggleHTMLClassVisibility(className) { var x = document.getElementsByClassName(className); var i; for (i = 0; i < x.length; i++) { if (x[i].style.display === "none") { x[i].style.display = "block"; } else { x[i].style.display = "none"; } } }; function toggleHistogramMarker() { toggleHTMLClassVisibility("histogram_marker"); }; function toggleGradingScheme() { toggleHTMLClassVisibility("grading_scheme"); };