I have this code which is only doing what i want with last element of my array...why is it so?
$(document).ready(function () {
var miArray=["Diseño web multidioma","Desarrollo de aplicaciones","Programacion servidores"];
for (i = 0; i <3; i++) {
$("#animation").hide().text(miArray[i]).fadeIn(2000, function () {
//$(this).css({"background-color": "yellow"}, function(){
//var div = $("#anuncio");
alert("the value of miArray[i] is: " + miArray[i]);
$(this).css({"background-color": "yellow"});
$(this).animate({height: '160px', opacity: '0.8'}, "slow");
$(this).animate({width: '300px', opacity: '0.8',}, "slow");
$(this).animate({height: '160px', opacity: '0.8'}, "slow");
/* /!*$(this).animate({width: '100px',opacity: '0.8' }, "slow");*!/*/
$(this).fadeOut(2000)
});
}
});