Hi guys,
I have modified a script slightly to get a fullscreen, real GIF based preloader for website.
Here’s the modified script.
- Copy this code.
- Create a new “custom tool” in your tracking & analytics settings.
- Paste the code and use default settings
- Tweak variables as per requirement to set perfect preloader
[#preloader](https://www.wix.com/code/home/forum/search/posts%3Fquery=.num.reloader) {
position: fixed;
width: 100%;
height: 100%;
z-index: 999;
overflow: visible;
background: [#FFFFFF](https://www.wix.com/code/home/forum/search/posts%3Fquery=.num.FFFFF) url(' [https://static.wixstatic.com/media/a9c507_e7dfa5241a674cd88e4f79eea3ec1013~mv2.gif](https://static.wixstatic.com/media/a9c507_e7dfa5241a674cd88e4f79eea3ec1013~mv2.gif) ') no-repeat center center;
}
I suggest the following tweaks you can make to this-
- Figure out your site load time and change the value in either var id = setInterval(frame, 64); or if(loading == 90) to make the preloader time match your site loading time.
- Test the mobile version to check how long its staying on and modify this line if(loading == 20) to match your timing.
Cheers
2 Likes
Thank you very much, Sameer!
It works well on my wix website. I have a quick question. Can I just set up this preloader for mobile users only, because I only have slow loading issue for the mobile version? I do not code. Please keep it as simple as possible. Thank you so much again.
X2
Can I just set up this preloader for mobile users only, because I only have slow loading issue for the mobile version? I do not code.