I have a grid of product images and I would like all images with the same ID to be made visible after 5 seconds with javascript. At the moment it only works with the first image while the others remain hidden and all have the same id. I wish it would work for all images with the same ID.
/html example/
<div class"product1 image">
<img src="image1.jpg" id="myid">
</div>
<div class"product2 image">
<img src="image2.jpg" id="myid">
</div>
/css example/
.image {
visibility: hidden;
}
/js example/
<script type="text/javascript">
function change () {
var image = document.getElementById ("myid");
image.style.visibility = "visible";
}
setTimeout ("change ();", 5000);
</script>