Modrinth/static/js/mod.js
2020-06-05 20:19:19 -07:00

18 lines
650 B
JavaScript

let currentlySelected = document.getElementById("description-bar");
let currentlySelectedDiv = document.getElementById("description");
function toggleSection(element) {
currentlySelected.classList.remove("mod-bar-active");
currentlySelected = element;
currentlySelected.classList.add("mod-bar-active");
currentlySelectedDiv.classList.remove("mod-show");
currentlySelectedDiv.classList.add("mod-hide");
currentlySelectedDiv = document.getElementById(element.id.replace("-bar", ""));
currentlySelectedDiv.classList.remove("mod-hide");
currentlySelectedDiv.classList.add("mod-show");
}
hljs.initHighlightingOnLoad();