I'm trying to use a javascript code only that I do not know anything about.
I learned the basic video class online, I still do not know how to create a code, I took the one here on the site, but this code does not want to run.
(I do not know if I should create a .js file or put this code with type = text / javascript script).
Note: I tried both modes and it did not work, if someone has another code or a solation thank you.
"I want to make the slides from Nintendo's website, now I'm trying to make the number that runs on the Nintendo DS gallery."
java.js:
function iniciarSlideImagens() {
var exibirImagens = function(current) {
var arrImgsAmarelas = [ 'contador0.png', 'contador1.png' ];
var arrImgsLaranjas = [ 'contador2.png', 'contador3.png' ];
document.getElementById("imagem").src = "cores-roleta/" + arrImgsAmarelas[current];
document.getElementById("imagem1").src = "cores-roleta/" + arrImgsLaranjas[current];
if (++current >= arrImgsAmarelas.length) {
current = 0;
}
setTimeout(function() { exibirImagens(current); }, 1000);
};
exibirImagens(0);
}
if(2>1){
iniciarSlideImagens();
}
HTML:
<img id="imagem" src="cores-roleta/contador0.png">
<img id="imagem1" src="cores-roleta/contador2.png">