Well my question is as follows, I would like to know how I would make javascript give you a 5 second interval before editing image.
My code:
window.onload = function() {
if(2>1){
document.getElementById("imagem").src = "https://placeholdit.imgix.net/~text?txtsize=36&txt=Imagem+1&w=350&h=150";
document.getElementById("imagem2").src = "https://placeholdit.imgix.net/~text?txtsize=36&txt=Imagem+2&w=350&h=150";
document.getElementById("imagem3").src = "https://placeholdit.imgix.net/~text?txtsize=36&txt=Imagem+3&w=350&h=150";
}
}
<img id="imagem" src="https://placeholdit.imgix.net/~text?txtsize=36&txt=Imagem+1&w=350&h=150"><imgid="imagem2" src="https://placeholdit.imgix.net/~text?txtsize=36&txt=Imagem+2&w=350&h=150"><imgid="imagem3" src="https://placeholdit.imgix.net/~text?txtsize=36&txt=Imagem+3&w=350&h=150">
link
That is, there was an interval in each src of 5 seconds.
That first javascript edits the id "image", passed 5 seconds edits the id "imagem2" etc ...