17 lines
No EOL
470 B
JavaScript
17 lines
No EOL
470 B
JavaScript
let div = document.createElement("div");
|
|
div.className = "loader";
|
|
div.innerHTML = `<div class="loader-dots">
|
|
<div class="dots"></div>
|
|
<div class="dots"></div>
|
|
<div class="dots"></div>
|
|
<div class="dots"></div>
|
|
<div class="dots"></div>
|
|
</div>`;
|
|
|
|
document.body.appendChild(div);
|
|
|
|
document.addEventListener('readystatechange', event => {
|
|
if (event.target.readyState === "complete") {
|
|
document.querySelector(".loader").style.display = "none";
|
|
}
|
|
}); |