Show hide images after time

Whats the best way to show an image on page load then after 5 seconds hide the image then show another image in my php page?

I’m editing, i got messy small screen on cellphone dosent helpme writting.

There are probably lots of ways of doing this.

You can use javascript.

Something like get element id, and put time with and if. Im sure I’ve red this on this page im almost certain, or something similar.

If you use jquery u can do it simple

You leave and image and hide the other or some container with image and text if you want inside using css, you can use id or class.

.imageHidden{
 Display: none;
}

Then on document ready or load you do the change

$(window).load(function() { 

or

$(document).ready()

You hide the old div, image, etc, and then show it

$(#newImage).hide(2000); example
$(.imageHidden).Show(addCustomTimeHere);

Dots fot class .
Numeral for ids #

If you use jquery read this its very complete

https://api.jquery.com/show/

Check this stackoverflow answer that uses on()

https://stackoverflow.com/questions/8786231/hiding-and-revealing-images-onload

Theres also fadeOut(); that it does what it says

Sponsor our Newsletter | Privacy Policy | Terms of Service