I made a basic one page html website and styled it. I have a small image gallery (6 images) and I want to use JS to display these images in a different order every time the page is refreshed. If the page isn't refreshed, I want it to be on a timer to refresh the images.
I know I would have to use Math.random, and I could use onload with an interval timer to change the images. I've done some research and I can't figure out how to implement this. Could anyone point me in the right direction?
Here's the html portion of the image gallery:
<section id="gallery">
<img src="./images/1.jpg" alt="img0">
<img src="./images/2.jpg" alt="img1">
<img src="./images/3.jpg" alt="img2">
<img src="./images/4.jpg" alt="img3">
<img src="./images/5.jpg" alt="img4">
<img src="./images/6.jpg" alt="img5">
</section>