12 lines
500 B
JavaScript
12 lines
500 B
JavaScript
export function initPageLoader() {
|
|
window.addEventListener('load', () => {
|
|
const pageloader = document.getElementById('pageloader');
|
|
const infraloader = document.getElementById('infraloader');
|
|
pageloader.classList.toggle('is-active');
|
|
var pageloaderTimeout = setTimeout(function () {
|
|
infraloader.classList.remove('is-active');
|
|
pageloader.classList.toggle('is-active');
|
|
clearTimeout(pageloaderTimeout);
|
|
}, 1200);
|
|
})
|
|
} |