Template:Notes toggle: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1: Line 1:
<html>
<html>
<script>
function toggleReferences() {
  var x = document.getElementById("content");
  var y = x.getElementsByClassName("reference");
  var i;
  for (i = 0; i < y.length; i++) {
    if (y[i].style.display === "none") {
      y[i].style.display = "inline";
    } else {
      y[i].style.display = "none";
    }
  }
  var z = x.getElementsByClassName("mw-references-wrap");
  var i;
  for (i = 0; i < z.length; i++) {
    if (z[i].style.display === "none") {
      z[i].style.display = "inline";
    } else {
      z[i].style.display = "none";
    }
  }
}
</script>
<label class="switch">
<label class="switch">
   <input type="checkbox" onclick="toggleReferences()">
   <input type="checkbox" onclick="toggleReferences()">