I have absolutely no idea of whats happening. But when I try to iterate in this, using [i] on line 12, it doesn´t work and I get the span I want to write in totally blank. But, without changing anything else, only switching [i] to [0] on line 12, for example, I get my span written as expected!
Any ideas?
$(function() {
var listaCoisas = [
"disruptiva",
"matadora",
"feroz",
"tradicional"
];
var i;
for (i=0; i<listaCoisas.length; i++){
setTimeout(function(){
$('#word-attribute').empty().append(listaCoisas[3]);
},1000);
}
});