Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

172
Vistas
How to animate these transitions?

I'm making a image slider and I have built the two functions that can switch to the next or previous picture. Now I just need to add some animations to them. How can I add animations to appendChild? If that's even possible

btw this is the array: [img.image1, img.image2, img.image3, img.image4]

frame.appendChild(array[0])

console.log(array)

function next() {
  // remove current picture from frame
  pics.appendChild(array[0])
  array.push(array[0])

  // add new picture to frame
  frame.appendChild(array[1])
  array.shift();
  console.log(array);
}

function previous() {
  console.log(array)

 // removes current image from the frame
  pics.insertBefore(array[0], array[1])

  // adds new picture to the frame

  frame.appendChild(array[array.length -1])
  array.unshift(array[array.length - 1])
  array.pop();
}
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda