hugo_themes_report/templates/js/selectionMenuCollapse.js

12 lines
372 B
JavaScript
Raw Normal View History

2021-08-11 11:58:10 -07:00
var menuButton = document.getElementById("selection-button");
menuButton.addEventListener("click", function() {
menuButton.classList.toggle("active");
var selectionMenu = document.getElementById("selection-menu");
if (selectionMenu.style.display === "block") {
selectionMenu.style.display = "none";
} else {
selectionMenu.style.display = "block";
}
});