I have created a preloader page for my website following tutorials, such as the one found here: https://codepen.io/bommell/pen/OPaMmj. However, I am facing a challenge in making this preloader appear fake without using heavy content like images or videos. I want it to serve as a default screen before my actual project loads. I have tried using setTimeout and clearTimeout in the JavaScript file, but it is not working as expected. Can anyone provide guidance on how to fake the preloading screen effectively?
function myFunction() {
myVar = setTimeout(function(){ document.body.addClass("loaded"); }, 3);
}
function myStopFunction() {
clearTimeout(myVar);
}
Iframe or other tricks have made the preloader work properly in the past, but I am seeking advice on achieving a similar effect without relying on heavy content.