A none jQuery solution. You will need to use the array index to give the illusion of waiting between each call, however each function has ran already. What will happen is: show color 1 in 1 second, show color 2 in 2 seconds...
var displaySequence = function(){
compSequence.forEach(function(color, index){
setTimeout(function(){
$("#" + color).fadeTo(300, 0.5).fadeTo(300, 1.0);
},
1000 * index);
})
}
adjust the 1000 * index to change the delay.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…