mirror of https://github.com/4xmen/xshop.git
added preloader to panel
parent
1004ec3bc8
commit
ecf6301212
@ -0,0 +1,23 @@
|
||||
let isWinLoaded = false;
|
||||
window.addEventListener('load',function () {
|
||||
|
||||
if (!isWinLoaded){
|
||||
forceLoad();
|
||||
isWinLoaded = true;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
setTimeout(function () {
|
||||
if (!isWinLoaded){
|
||||
forceLoad();
|
||||
isWinLoaded = true;
|
||||
}
|
||||
},5000);
|
||||
const forceLoad = function () {
|
||||
const preloader = document.querySelector('#panel-preloader');
|
||||
preloader.style.height = 0;
|
||||
setTimeout( () => {
|
||||
preloader.style.display = 'none';
|
||||
},500);
|
||||
};
|
Loading…
Reference in New Issue