Add Nuxt
This commit is contained in:
13
app/assets/loading/loading.js
Executable file
13
app/assets/loading/loading.js
Executable file
@@ -0,0 +1,13 @@
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
var iframes = document.querySelectorAll("iframe");
|
||||
|
||||
iframes.forEach(function(iframe) {
|
||||
var loader = iframe.parentElement.querySelector(".loader");
|
||||
loader.classList.add("active");
|
||||
iframe.addEventListener("load", function() {
|
||||
loader.classList.remove("active");
|
||||
iframe.classList.add("loaded");
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user