reasonably working calibreweb thing
This commit is contained in:
14
CalibreWebCompanion/library/static/js/nav.js
Normal file
14
CalibreWebCompanion/library/static/js/nav.js
Normal file
@ -0,0 +1,14 @@
|
||||
var dropdown = document.getElementsByClassName("dropdown-btn");
|
||||
var i;
|
||||
|
||||
for (i = 0; i < dropdown.length; i++) {
|
||||
dropdown[i].addEventListener("click", function() {
|
||||
this.classList.toggle("active");
|
||||
var dropdownContent = this.nextElementSibling;
|
||||
if (dropdownContent.style.display === "block") {
|
||||
dropdownContent.style.display = "none";
|
||||
} else {
|
||||
dropdownContent.style.display = "block";
|
||||
}
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user