mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
add listeners to sort by headers
This commit is contained in:
parent
4fcd62bb99
commit
d488b68226
2 changed files with 16 additions and 7 deletions
|
|
@ -147,6 +147,15 @@ function addListeners() {
|
|||
document.getElementById("statesAdd").addEventListener("click", enterAddStateMode);
|
||||
document.getElementById("statesExport").addEventListener("click", downloadStatesData);
|
||||
|
||||
document
|
||||
.getElementById("statesHeader")
|
||||
.querySelectorAll(".sortable")
|
||||
.forEach(function (element) {
|
||||
element.addEventListener("click", function () {
|
||||
sortLines(this);
|
||||
});
|
||||
});
|
||||
|
||||
body.addEventListener("click", function (event) {
|
||||
const element = event.target;
|
||||
const classList = element.classList;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue