Fix tooltip.js
Adds a timeout to make sure everything is loaded before changing the DOM
This commit is contained in:
parent
214d093869
commit
e2588d51af
|
|
@ -3,6 +3,7 @@ let tooltipEle;
|
||||||
window.addEventListener("load", ()=>{
|
window.addEventListener("load", ()=>{
|
||||||
tooltipEle = document.createElement("p");
|
tooltipEle = document.createElement("p");
|
||||||
tooltipEle.innerHTML = defaultTooltip;
|
tooltipEle.innerHTML = defaultTooltip;
|
||||||
|
setTimeout(()=>{
|
||||||
document.getElementById("extraInfo").children[1].appendChild(tooltipEle);
|
document.getElementById("extraInfo").children[1].appendChild(tooltipEle);
|
||||||
let buttons = document.getElementsByClassName("elementButton");
|
let buttons = document.getElementsByClassName("elementButton");
|
||||||
[...buttons].forEach(button=>{
|
[...buttons].forEach(button=>{
|
||||||
|
|
@ -19,3 +20,4 @@ window.addEventListener("load", ()=>{
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue