How can I make an image display on the screen for 2 seconds and it switches back to the first screen?
9 Answers
New Answerhttps://code.sololearn.com/WXWPivr4755n/?ref=app
12/28/2020 9:55:40 PM
πππππππ πππ¦ [π°π²π πΈπ π΄] (γ£ββ‘β)γ£9 Answers
New Answer//Use the setTimeout function: setTimeout (function (){ document.querySelector("#dogGif").remove(); }, 2000);
I see the game, the problem here is that you are changing the src attribute of image stored on "unhatchedEgg", so you need to put the url that you have before to switch the image. But this is a problem too because every time that you change src, images are reloaded The bes way to resolve this is loading all the images before and then you can use it without having to load again
Luis. I tried to add that into my code but there was an error
https://code.sololearn.com/WlccCdxW49ml/?ref=app
Don't understand, can I have example
How to make the code
SoloLearn Inc.
4 Embarcadero Center, Suite 1455Send us a message