Quote:
Originally Posted by 2MuchMark
Hi Sarah,
I will clarify:
It is a loop because it is loading a bunch of pictures, one after another. The program doing it is outputting to HTML. Unfortunately I can't edit that program at the moment, so I'm looking to edit the HTML side instead.
|
First, it is not sarah. You should know better.
Ok, but that is different then what you said originally.
How long do you want each image to appear for?
What you are describing is basically a slideshow and there are many scripts available to do what you want.
Again, what is the trigger? Do you just want it to loop through the whole time the page is being displayed, so from when the page loads to when the user leaves the page? Or is there some other trigger, user clicking something or anything like that?
Quote:
Originally Posted by blackmonsters
Code:
<script>
document.addEventListener("DOMContentLoaded", function(event) {
var imgs = document.getElementsByTagName("img");
var ctr = imgs.length;
var i;
for (i = 0; i < ctr; i++) {
hold = imgs[i].src;
imgs[i].src = hold.replace("https://","https://1");
}
});
</script>
|
That would be close to what he wants except you are assuming that the images are already on the page.
.