✨ began button navigation
This commit is contained in:
11
js/buttons.js
Normal file
11
js/buttons.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import {insertFileContentIn as insert} from "./navigator.js";
|
||||
|
||||
export async function init() {
|
||||
const naviElements = document.getElementsByClassName("navi");
|
||||
for (let i = 0; i < naviElements.length; i++) {
|
||||
const element = naviElements.item(i);
|
||||
element.addEventListener("click", function () {
|
||||
insert("content", element.id)
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user