+ 6
Can i use it to create a loader
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <div class="con"> <span></span> <span></span> <span></span> <span></span> <span></span> <span></span> <span></span> </div> </body> </html>
5 Answers
+ 6
Pls help me on it
+ 5
Delphi Sr.
Nice Loader đ
The second error comes from using the "onload" function as it waits for the whole document to load but your function may not have, remove it and replace "myFunction" with this:
document.addEventListener("DOMContentLoaded" , function() {
var myVar = setTimeout(showPage, 2000);
}
As for the second one, I'm not sure about that at the moment, let me try a bit more.
EDIT:
I guess the first error was at the "showPage" argument in the setTimeout function since it wasn't defined, so just moving around the position of those code blocks fixes that:
https://code.sololearn.com/W6f8ZVOWL2PG/?ref=app
Also it works fine with these in but just to note there was a closing style tag with no opening one, I think you wanted to use the class "display-container" instead of "display-comtainer" and you were missing one closing div tag.
EDIT:
No Problem đ
+ 2
://What type of loader đ€đ€
+ 2
This creates a loader but I'm having error with it.
https://code.sololearn.com/WzH60df1WO17/?ref=app
0
LynTon thanks for the correction.