Estoy haciendo un control deslizante de imagen y he creado las dos funciones que pueden cambiar a la imagen siguiente o anterior. Ahora solo necesito agregarles algunas animaciones. ¿Cómo puedo agregar animaciones a appendChild? Si eso es posible
por cierto, esta es la matriz: [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(); }