Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/11/2012, 14:16
merecumbe
 
Fecha de Ingreso: noviembre-2008
Mensajes: 3
Antigüedad: 15 años, 6 meses
Puntos: 0
Acceder a los elementos Html desde Javascript

Hola a todos. Quisiera preguntarles tengo el siguiente array en java script

fotos= ["<img src='img1' />",
"<img src='img2' />",
"<img src='img3' />",
"<img src='img4' />",
"<img src='img5' />",
"<img src='img6' />",
"<img src='img7' />"];

el cual por medio de document.getElementById("imagenes").innerHTML = fotos[numFoto]; las voy ingresando a un div con id imagenes.

y realizo una animacion en css3 de que cuando se agrege la foto aparezca con una animacion

por ejemplo


.img{
-webkit-animation-name:animacion_2;
-webkit-animation-duration:5s;
}

@-webkit-keyframes animacion_2{
0%{
opacity:0;
}
100%{
opacity:100%;
}
}

Como podria yo decirle a ajavascript que a cada imagen de ese array cuando aparezca le aplique el estilo css de animacion

Gracias por su ayuda