Guys I need help with java script I want to show up the web page after the preloading and I don't know how | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Guys I need help with java script I want to show up the web page after the preloading and I don't know how

https://code.sololearn.com/WTS6NK6tJMG4/?ref=app

12th Aug 2021, 2:03 PM
Nv Abdallah
Nv Abdallah - avatar
3 Answers
0
you can write a script to remove the loader after the page fully loaded with this code : document.addEventListener('DOMContentLoaded', function() { // your logic goes here }); or with Jquery : $( document ).ready(function() { // your logic goes here });
12th Aug 2021, 2:24 PM
Nima
0
I still don't understand because I'm new with java
12th Aug 2021, 2:26 PM
Nv Abdallah
Nv Abdallah - avatar
0
you should remove the loader with some code like that after the page fully loaded document.addEventListener('DOMContentLoaded', function() { // selecting the loader and remove it when the page fully loaded document.querySelector(".loader").remove(); }); it will listen for an event the event is fully loading the page after that event occur the above code will execute it will look for the first element with the class of loader and removes it
12th Aug 2021, 2:28 PM
Nima