How can I remove a loading part in my code? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 6

How can I remove a loading part in my code?

I am making new project I was try to make new loading screen which will get disappeared after x time in the code?? How could I do that And after that loading screen get disappear. It will appear new <div> in the body??? Pls help me out

25th Aug 2021, 11:09 AM
JAY • ≫
JAY • ≫ - avatar
5 Respuestas
+ 7
U can try this :) function load(){ document.getElementById("").style.display="none"; } setTimeout(load,5000)
25th Aug 2021, 11:21 AM
Aditya
Aditya - avatar
+ 7
Hope this will help you explanation :- I have created two div one for loader and one for content ( that I want to show after when code get loaded ) the content div is hidden by the help of display property and I have written a function in JavaScript in which after 2 seconds the loader will disappear and content will appear "https://code.sololearn.com/WNC1LPnOu81P/?ref=app"
25th Aug 2021, 11:38 AM
ANMOL
ANMOL - avatar
+ 4
ADITYA[NO DM🚫][LESS ACTIVE 📚] bro this thing I know bro but what I want to make it disappear this loader and appear the next par of the code
25th Aug 2021, 11:23 AM
JAY • ≫
JAY • ≫ - avatar
+ 4
Share the code JAY • ≫
25th Aug 2021, 11:24 AM
Aditya
Aditya - avatar
+ 3
you could create a function to load by toggling the loading class with display block/none Then call the timeout with setTimeout(functionName, 2000) For 2 seconds delay
25th Aug 2021, 5:38 PM
King Frankostein®
King Frankostein® - avatar