Newer
Older
renshu-2022 / event5.js.20230125
// document.addEventListener("DOMContentLoaded", (e) => {
//     for (let id of ["station", "miraini", "koryo", "sankyo", "siyakusyo","moyasikun",]) {
//         document.getElementById(id).addEventListener("markerFound",
//             (e) => {
//                 document.getElementById("vr-"+id).classList.remove("notfound");
//      });
//     }
// });

document.addEventListener("DOMContentLoaded", marker_found_init);

function marker_found_init(){
    for (let id of ["station", "miraini", "koryo", "sankyo", "siyakusyo"]) {
        document.getElementById(id).addEventListener("markerFound", (e) =>
        {
        	for (let id2 of ["station", "miraini", "koryo", "sankyo", "siyakusyo"]) {
       			document.getElementById("vr-"+id2).classList.add("notfound");
        	}
        	document.getElementById("vr-"+id).classList.remove("notfound");
        });
    }
}