mirror of
https://github.com/EyeTrackVR/EyeTrackVR-Docs.git
synced 2025-11-04 14:49:44 +08:00
21 lines
693 B
JavaScript
21 lines
693 B
JavaScript
(() => {
|
|
let btn = document.querySelectorAll(".bp");
|
|
btn.forEach((header) => {
|
|
header.addEventListener("click", function (event) {
|
|
console.log(event.target.id);
|
|
document.querySelectorAll(".bpdata").forEach((data) => {
|
|
data.classList.remove("open");
|
|
});
|
|
document.querySelectorAll(".bp").forEach((data) => {
|
|
data.classList.remove("open");
|
|
});
|
|
document
|
|
.querySelector("#" + event.target.id + "_data")
|
|
.classList.add("open");
|
|
document.querySelector("#" + event.target.id).classList.add("open");
|
|
document.querySelector("#bpImage").src =
|
|
"../assets/img/" + event.target.id + ".png";
|
|
});
|
|
});
|
|
})();
|