+ 1
[SOLVED]Help me to load my resources in my web project
I created a clock app (attached with the question). It contains a dark mode/light mode switcher button. When the user clicks the button the background of the page changes to light/dark image accordingly. The default BG image is light . THE PROBLEM IS THAT WHEN USER CLICKS THE DARK MODE BUTTON, IT TAKES 2 TO 3 SECS TO LOAD THE DARK IMAGE BECAUSE THE IMAGE STARTS LOADING WHEN USER CLICKS THE BUTTON. CAN YOU HELP ME TO LOAD THE IMAGE INTO THE DOCUMENT AS SOON AS THE DOCUMENT LOADS AND IT CAN THIS USE THE IMAGE WHEN THE USER CLICKS THE BUTTON Here's the code: https://code.sololearn.com/WkAJZ4P71hEp/?ref=app
2 Respuestas
+ 4
Satyam Mishra I understand ur question, but i think that its impossible, it would take some time fetch that image coz u r providing a url. So if u download the image on pc and use it, it won't take that long, but u can't do it on sololearn.
+ 3
Thanks Mr. Rimon,
But, I did not understand how will lesson help