I put you in situation, I have a div with an image of a dog, when you click on it, its sound is played and the div becomes smaller and bigger with the small class that contains that animation.
The problem is that at the end of that animation the image of its initial position is unbalanced, so I am trying to remove the small class and leave it as it was by default. I searched the internet and found this form but it does not work, any solution? Thanks in advance.
function playPerro(){
document.getElementById("audiocerdo").pause();
document.getElementById("audiovaca").pause();
document.getElementById("audiogato").pause();
document.getElementById("audioperro").play();
document.getElementById("perro").className="animal pequenio";
var claseAnimacion = document.getElementsByClassName("animal pequenio");
function myPause() {
document.getElementById("audioperro").pause();
claseAnimacion.classList.remove("pequenio");
}
setInterval(myPause, 5000);
}